You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
674 B
32 lines
674 B
<img class="{{ .class }}"
|
|
{{- with .image -}}
|
|
|
|
{{ $smallest := (.Resize "305x webp q60") }}
|
|
|
|
srcset="
|
|
{{- with $smallest -}}
|
|
{{ printf "%s %dw," .RelPermalink .Width }}
|
|
{{- end -}}
|
|
|
|
{{- with (.Resize "480x webp q60") -}}
|
|
{{ printf "%s %dw," .RelPermalink .Width }}
|
|
{{- end -}}
|
|
|
|
{{- with (.Resize "600x webp q70") -}}
|
|
{{ printf "%s %dw," .RelPermalink .Width }}
|
|
{{- end -}}
|
|
"
|
|
|
|
sizes="
|
|
(max-width: 480px) 305px;
|
|
(max-width: 600px) 480px;
|
|
600px"
|
|
|
|
src="
|
|
{{- with $smallest -}}
|
|
{{ .RelPermalink }}
|
|
{{- end -}}"
|
|
|
|
alt="{{ .Params.alt }}"
|
|
{{- end -}}
|
|
>
|
|
|