feat: use thumbnail in section and links image (#1291)

* feat: use thumbnail for section image

* feat: use thumbnail in links image

* fix typo
This commit is contained in:
Jimmy
2026-03-05 13:57:37 +01:00
committed by GitHub
parent a95d0e7c85
commit 25bf63778c
2 changed files with 27 additions and 12 deletions
+13 -4
View File
@@ -20,10 +20,19 @@
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources) -}}
{{ if $image }}
<div class="section-image">
<img src="{{ $image.Permalink }}"
width="{{ $image.Width }}"
height="{{ $image.Height }}"
loading="lazy">
{{ partial "helper/thumbnail-image" (dict
"Resource" $image.Resource
"Width" 60
"Height" 60
"Resize" .Site.Params.ImageProcessing.Thumbnail.Enabled
"Attributes" (dict
"src" $image.Permalink
"alt" .Title
"loading" "lazy"
"width" $image.Width
"height" $image.Height
)
) }}
</div>
{{ end }}
</div>