fix bug in picture with params

This commit is contained in:
stereobooster
2023-11-29 14:51:44 +01:00
parent dbf421848f
commit f2af0198fa
5 changed files with 13 additions and 6 deletions
+3 -1
View File
@@ -20,7 +20,9 @@
<figure>
{{- with $img -}}
{{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "x2" $x2) }}
{{ $lazy := $.Page.Site.Params.enableImageLazyLoading | default true }}
{{ $webp := $.Page.Site.Params.enableImageWebp | default true }}
{{ partial "picture.html" (dict "img" . "alt" $altText "class" $class "x2" $x2 "lazy" $lazy "webp" $webp) }}
{{- else -}}
<img src="{{ .Destination | safeURL }}" alt="{{ $altText }}" class="{{ $class }}"/>
{{- end -}}