avif gebruiken we niet, weggehaald uit code
This commit is contained in:
parent
4efe0a3612
commit
b89f1ecbcb
|
@ -3,13 +3,6 @@
|
||||||
{{ $isPNG := eq (path.Ext .Destination) ".png" }}
|
{{ $isPNG := eq (path.Ext .Destination) ".png" }}
|
||||||
|
|
||||||
{{ if ($isJPG) -}}
|
{{ if ($isJPG) -}}
|
||||||
{{ $avifPath:= replaceRE "(jpg|jpeg)$i" ".avif" .Destination }}
|
|
||||||
{{ $avifPathStatic:= printf "static/%s" $avifPath }}
|
|
||||||
|
|
||||||
{{ if (fileExists $avifPathStatic) -}}
|
|
||||||
<source srcset="{{ $avifPath | safeURL }}" type="image/avif" >
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{ $webpPath:= replace .Destination ".jpg" ".webp" }}
|
{{ $webpPath:= replace .Destination ".jpg" ".webp" }}
|
||||||
{{ $webpPathStatic:= printf "static/%s" $webpPath }}
|
{{ $webpPathStatic:= printf "static/%s" $webpPath }}
|
||||||
|
|
||||||
|
@ -19,13 +12,6 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ if ($isPNG) -}}
|
{{ if ($isPNG) -}}
|
||||||
{{ $avifPath:= replace .Destination ".png" ".avif" }}
|
|
||||||
{{ $avifPathStatic:= printf "static/%s" $avifPath }}
|
|
||||||
|
|
||||||
{{ if (fileExists $avifPathStatic) -}}
|
|
||||||
<source srcset="{{ $avifPath | safeURL }}" type="image/avif" >
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{ $webpPath:= replace .Destination ".png" ".webp" }}
|
{{ $webpPath:= replace .Destination ".png" ".webp" }}
|
||||||
{{ $webpPathStatic:= printf "static/%s" $webpPath }}
|
{{ $webpPathStatic:= printf "static/%s" $webpPath }}
|
||||||
|
|
||||||
|
|
Reference in a new issue