From e77574b505c090c4f41e6a0b77215ac3710c0e22 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 21 May 2023 18:38:23 +0200 Subject: [PATCH] fix img alt --- layouts/shortcodes/img.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html index 7fae19d..c43a3ec 100644 --- a/layouts/shortcodes/img.html +++ b/layouts/shortcodes/img.html @@ -1,12 +1,12 @@ {{ $src := .Get "src" }} {{ $origImage := .Page.Resources.GetMatch $src }} {{ if eq $origImage.MediaType.SubType "svg" }} - .Get "alt" + {{ .Get "alt" }} {{ else }} {{ $resizeAdd := .Get "resizeAdd" | default "" }} {{ $resize := printf "%s%s" (.Get "resize" | default "720x webp Lanczos ") $resizeAdd }} {{ $image := $origImage.Resize $resize }} - .Get "alt" + {{ .Get "alt" }} {{ end }}