feat(renderer): add webp without lqip

This commit is contained in:
kdevo
2021-10-11 20:46:34 +02:00
parent e73b63ad46
commit 0efce069c3
+11
View File
@@ -0,0 +1,11 @@
{{ $class := .class }}
{{ $noscriptSupport := .noscript }}
{{ $imgDict := .imgDict }}
{{ $imgDictFallback := .imgDictFallback }}
<picture>
<source type="image/webp"
{{- with $imgDict.default }} height="{{ .Height }}" width="{{ .Width }}" {{- end -}}
{{- if $imgDict.responsive -}}{{ with partial "renderer/_srcset" $imgDict }} data-sizes="auto" data-srcset="{{ . }}"{{- end }} {{- end -}}>
{{ partial "renderer/lqip" (merge . (dict "imgDict" $imgDictFallback)) }}
</picture>