From bd0b95d5076033e88bf1436b8b79e3abcf0353f5 Mon Sep 17 00:00:00 2001 From: Sangeeth Sudheer Date: Sat, 15 Mar 2025 21:46:53 +0530 Subject: Remove `px` from width/height img attributes in render-image hook As per the spec, width/height attrs should be non-negative integers but currently, they are being rendered with a `px` suffix. This change removes the suffix which hopefully fixes any outstanding layout shifts. References: - https://html.spec.whatwg.org/multipage/embedded-content-other.html#dimension-attributes --- layouts/_default/_markup/render-image.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layouts/_default/_markup') diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 679fd76..e6a5c39 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -47,7 +47,7 @@ and build the img class string as "img-tag1 img-tag2 ..."
- {{ .Text }} + {{ .Text }}
{{ with .Title }} -- cgit v1.2.3