Optimisation des images++
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user