fix(article list): specify image width in srcset
This commit is contained in:
parent
8c4ad17a09
commit
1e28a661d9
@ -8,7 +8,7 @@
|
|||||||
{{- $thumbnailRetina := $image.resource.Fill "1600x500" -}}
|
{{- $thumbnailRetina := $image.resource.Fill "1600x500" -}}
|
||||||
|
|
||||||
<img src="{{ $thumbnail.RelPermalink }}"
|
<img src="{{ $thumbnail.RelPermalink }}"
|
||||||
srcset="{{ $thumbnail.RelPermalink }} 1x, {{ $thumbnailRetina.RelPermalink }} 2x"
|
srcset="{{ $thumbnail.RelPermalink }} 800w, {{ $thumbnailRetina.RelPermalink }} 1600w"
|
||||||
width="{{ $thumbnail.Width }}" height="{{ $thumbnail.Height }}" loading="lazy"
|
width="{{ $thumbnail.Width }}" height="{{ $thumbnail.Height }}" loading="lazy"
|
||||||
alt="Featured image of post {{ .Title }}" />
|
alt="Featured image of post {{ .Title }}" />
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
Loading…
Reference in New Issue
Block a user