1

Optimisation des images++

This commit is contained in:
2026-03-06 00:16:17 +01:00
parent 3b3733cb96
commit 84af2115be
7 changed files with 11 additions and 9 deletions

View File

@@ -41,6 +41,8 @@
{{- $thumbnailTransform = "900x506" -}}
{{- end -}}
{{- $thumbnailOptions := printf "%s webp q80" $thumbnailTransform -}}
{{- $coverPath := $page.Params.cover -}}
{{- $image := false -}}
{{- if $coverPath -}}
@@ -109,7 +111,7 @@
<a href="{{ $page.RelPermalink }}">
<figure>
{{- with $image -}}
{{- $resized := .Fill $thumbnailTransform -}}
{{- $resized := .Fill $thumbnailOptions -}}
<img src="{{ $resized.RelPermalink }}" alt="Image de couverture pour {{ $page.Title }}" loading="lazy">
{{- end -}}
</figure>
@@ -125,7 +127,7 @@
<a href="{{ $page.RelPermalink }}">
<figure>
{{- with $image -}}
{{- $resized := .Fill $thumbnailTransform -}}
{{- $resized := .Fill $thumbnailOptions -}}
<img src="{{ $resized.RelPermalink }}" alt="Image de couverture pour {{ $page.Title }}" loading="lazy">
{{- end -}}
</figure>