|
|
|
<img class="{{ .class }}"
|
|
|
|
{{- with .image -}}
|
|
|
|
|
|
|
|
{{ $smallest := (.Resize "320x 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 -}}
|
|
|
|
|
|
|
|
{{- with (.Resize "800x webp q90") -}}
|
|
|
|
{{ printf "%s %dw," .RelPermalink .Width }}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
sizes="
|
|
|
|
(max-width: 480px) 320px;
|
|
|
|
(max-width: 600px) 480px;
|
|
|
|
(max-width: 800px) 600px;
|
|
|
|
800px"
|
|
|
|
|
|
|
|
src="
|
|
|
|
{{- with $smallest -}}
|
|
|
|
{{ .RelPermalink }}
|
|
|
|
{{- end -}}"
|
|
|
|
|
|
|
|
alt="{{ .Params.alt }}"
|
|
|
|
{{- end -}}
|
|
|
|
>
|