Préserver les GIF animés lors des transformations d'images
This commit is contained in:
@@ -4,7 +4,11 @@
|
||||
{{- $assetPath := "images/oeuvres/l-anankeisme.png" -}}
|
||||
{{- $source := resources.Get $assetPath -}}
|
||||
{{- if $source -}}
|
||||
{{- $img := $source.Resize "320x webp q80" -}}
|
||||
{{- $img := partial "media/process-image.html" (dict
|
||||
"image" $source
|
||||
"action" "Resize"
|
||||
"spec" "320x"
|
||||
) -}}
|
||||
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}" alt="Couverture de L'Anankéisme" loading="lazy">
|
||||
{{- end -}}
|
||||
</figure>
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
{{- $assetPath := "images/oeuvres/l-humain-cette-espece-primitive.jpeg" -}}
|
||||
{{- $source := resources.Get $assetPath -}}
|
||||
{{- if $source -}}
|
||||
{{- $img := $source.Resize "320x webp q80" -}}
|
||||
{{- $img := partial "media/process-image.html" (dict
|
||||
"image" $source
|
||||
"action" "Resize"
|
||||
"spec" "320x"
|
||||
) -}}
|
||||
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}" alt="Couverture de L'Humain, cette espèce primitive" loading="lazy">
|
||||
{{- end -}}
|
||||
</figure>
|
||||
|
||||
Reference in New Issue
Block a user