do not lazy load the feature image

pull/693/head
stereobooster 2023-11-26 14:38:27 +01:00
parent 6eb34e7124
commit 0c6c30fec1
4 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@
{{ $img = resources.Get $path }}
{{ end -}}
{{/* https://github.com/gohugoio/hugo/pull/10666/files */}}
{{/* https://github.com/gohugoio/hugo/pull/10666 */}}
{{- $params := $url.Query -}}
{{- $x2Param := $params.Get "2x" -}}
{{- $x2 := false -}}

View File

@ -17,7 +17,7 @@
<div class="prose">
{{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }}
{{ $class := "mb-6 -mt-4 rounded-md" }}
{{ partial "pictureDefaults.html" (dict "img" . "alt" $altText "class" $class) }}
{{ partial "pictureDefaults.html" (dict "img" . "alt" $altText "class" $class "lazy" false) }}
{{ with $.Params.coverCaption }}
<figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption>
{{ end }}

View File

@ -4,7 +4,7 @@
{{ $lazy := .lazy }}
{{ $webp := .webp }}
{{ $lqip := .lqip }}
{{ $x2 := .x2 | default false }}
{{ $x2 := .x2 }}
{{ with $img }}
{{ if (eq .MediaType.SubType "svg") }}

View File

@ -1,7 +1,7 @@
{{ $img := .img }}
{{ $alt := .alt }}
{{ $class := .class }}
{{ $lazy := $.Page.Site.Params.enableImageLazyLoading | default true }}
{{ $lazy := .lazy | default $.Page.Site.Params.enableImageLazyLoading | default true }}
{{ $webp := $.Page.Site.Params.enableImageWebp | default true }}
{{ $lqip := false }}
{{ $x2 := .x2 }}