From b7954d931dc041323dfa8875db30c8026b7d314e Mon Sep 17 00:00:00 2001 From: Andrew Heberle Date: Mon, 29 Apr 2024 20:32:04 +0800 Subject: [PATCH] Generate class properly for SVG --- picture/partial/picture.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/picture/partial/picture.html b/picture/partial/picture.html index 52f48ed..56da9d3 100644 --- a/picture/partial/picture.html +++ b/picture/partial/picture.html @@ -262,6 +262,9 @@ {{- if hugo.IsProduction }} {{- $img = $img | minify | fingerprint }} {{- end }} + + {{/* generate class attr */}} + {{- $attrs = merge $attrs (dict "class" (delimit $class " ")) -}} {{- else }} {{- if and (ne $img.MediaType "image/webp") $webp }}