diff options
author | Francesco Tomaselli <tomaselli.fr@gmail.com> | 2025-03-19 19:07:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-19 19:07:57 +0100 |
commit | cabd22689678f324d4e04ed537c6c917d5bf7d4b (patch) | |
tree | 453be84383993ec07ecfe5e23398434e34bfbf10 | |
parent | 6b9ab29f530b46850daf9ba4b6aa79e190c063f1 (diff) | |
parent | bd0b95d5076033e88bf1436b8b79e3abcf0353f5 (diff) |
Merge pull request #101 from runofthemillgeek/fix/use-unitless-img-width-height
Remove `px` from width/height img attributes in render-image hook
-rw-r--r-- | layouts/_default/_markup/render-image.html | 2 |
1 files changed, 1 insertions, 1 deletions
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 ..." <figure class="{{ $classes }}"> <div> - <img loading="lazy" alt="{{ .Text }}" src="{{ $url }}" {{ with $imgResource }}width="{{ .Width }}px" height="{{ .Height }}px"{{ end }}> + <img loading="lazy" alt="{{ .Text }}" src="{{ $url }}" {{ with $imgResource }}width="{{ .Width }}" height="{{ .Height }}"{{ end }}> </div> {{ with .Title }} |