From 5aac274434dead35df89c6a7be3933075e0b038b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9zar=20Augusto?= <32869222+cizordj@users.noreply.github.com> Date: Mon, 6 Mar 2023 20:21:08 -0300 Subject: [PATCH] Update the image shortcode - Add both width and height attributes --- layouts/shortcodes/image.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/shortcodes/image.html b/layouts/shortcodes/image.html index 6b2a2c0..6937b28 100644 --- a/layouts/shortcodes/image.html +++ b/layouts/shortcodes/image.html @@ -1,3 +1,3 @@ {{ if .Get "src" }} - <img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} /> +<img src="{{ .Get "src" | safeURL }}" {{ with .Get "alt" }} alt="{{ . | plainify }}" {{ end }} class="{{ with .Get "position"}}{{ . }}{{ else -}} left {{- end }}" {{ with .Get "style" }} style="{{ . | safeCSS }}" {{ end }} {{ with .Get "width" }} width="{{ . | plainify }}" {{ end }} {{ with .Get "height" }} height="{{ . | plainify }}" {{ end }} /> {{ end }}