tutte le immagini sono webp

This commit is contained in:
Paolo Asperti 2024-07-17 23:23:08 +02:00
parent a6936a9629
commit 38d662b594
Signed by: paspo
GPG Key ID: 06D46905D19D5182

View File

@ -4,9 +4,9 @@
{{- $path := strings.TrimPrefix "./" $u.Path }} {{- $path := strings.TrimPrefix "./" $u.Path }}
{{- with or (.PageInner.Resources.Get $path) (resources.Get $path) -}} {{- with or (.PageInner.Resources.Get $path) (resources.Get $path) -}}
{{- if gt .Width 1400 -}} {{- if gt .Width 1400 -}}
{{- $src = (.Resize "1400x jpg q50").RelPermalink -}} {{- $src = (.Resize "1400x webp q50").RelPermalink -}}
{{- else -}} {{- else -}}
{{- $src = .RelPermalink -}} {{- $src = (.Process "webp q50").RelPermalink -}}
{{- end -}} {{- end -}}
{{- with $u.RawQuery -}} {{- with $u.RawQuery -}}
{{- $src = printf "%s?%s" $src . -}} {{- $src = printf "%s?%s" $src . -}}