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 }} {{ $img = resources.Get $path }}
{{ end -}} {{ end -}}
{{/* https://github.com/gohugoio/hugo/pull/10666/files */}} {{/* https://github.com/gohugoio/hugo/pull/10666 */}}
{{- $params := $url.Query -}} {{- $params := $url.Query -}}
{{- $x2Param := $params.Get "2x" -}} {{- $x2Param := $params.Get "2x" -}}
{{- $x2 := false -}} {{- $x2 := false -}}

View File

@ -17,7 +17,7 @@
<div class="prose"> <div class="prose">
{{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }} {{ $altText := $.Params.featureAlt | default $.Params.coverAlt | default "" }}
{{ $class := "mb-6 -mt-4 rounded-md" }} {{ $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 }} {{ with $.Params.coverCaption }}
<figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption> <figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption>
{{ end }} {{ end }}

View File

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

View File

@ -1,7 +1,7 @@
{{ $img := .img }} {{ $img := .img }}
{{ $alt := .alt }} {{ $alt := .alt }}
{{ $class := .class }} {{ $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 }} {{ $webp := $.Page.Site.Params.enableImageWebp | default true }}
{{ $lqip := false }} {{ $lqip := false }}
{{ $x2 := .x2 }} {{ $x2 := .x2 }}