serve webp in home carousel
This commit is contained in:
parent
d6b9bb444d
commit
8db1ca2ad9
@ -16,10 +16,21 @@
|
||||
{{- $webpl := $image.Resize (printf "%dx webp q%d picture" 2200 75) }}
|
||||
<figure class="image">
|
||||
<picture>
|
||||
<source type="image/webp" srcset="{{ $jpegs.Permalink }} {{ $jpegs.Width }}w,{{ $jpegm.Permalink }} {{ $jpegm.Width }}w,{{ $jpegl.Permalink }} {{ $jpegl.Width }}w">
|
||||
<source type="image/webp"
|
||||
srcset="{{ $webps.Permalink }} {{ $webps.Width }}w,
|
||||
{{ $webpm.Permalink }} {{ $webpm.Width }}w,
|
||||
{{ $webpl.Permalink }} {{ $webpl.Width }}w"
|
||||
sizes="(max-width: 1023px) 100vw,
|
||||
(max-width: 1439px) 1024px,
|
||||
1440px">
|
||||
<img src='{{ $jpegl.Permalink }}'
|
||||
{{ if ne $index 0 }} loading="lazy" {{ end }}
|
||||
srcset="{{ $jpegs.Permalink }} {{ $jpegs.Width }}w,{{ $jpegm.Permalink }} {{ $jpegm.Width }}w,{{ $jpegl.Permalink }} {{ $jpegl.Width }}w"
|
||||
srcset="{{ $jpegs.Permalink }} {{ $jpegs.Width }}w,
|
||||
{{ $jpegm.Permalink }} {{ $jpegm.Width }}w,
|
||||
{{ $jpegl.Permalink }} {{ $jpegl.Width }}w"
|
||||
sizes="(max-width: 1023px) 100vw,
|
||||
(max-width: 1439px) 1024px,
|
||||
1440px">
|
||||
alt="{{ $image.Permalink }}">
|
||||
</picture>
|
||||
</figure>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user