|
|
@ -15,6 +15,7 @@ Renders an image with the given class, alt, and sizes. |
|
|
|
{{- $sizesParts := slice }} |
|
|
|
{{- $len := len $sizes }} |
|
|
|
|
|
|
|
{{- if .image }} |
|
|
|
{{/* Loop through widths to resize images and build attributes */}} |
|
|
|
{{- range $index, $width := $sizes }} |
|
|
|
{{- $resizeSpec := printf "%dx webp q90" $width }} |
|
|
@ -41,3 +42,4 @@ Renders an image with the given class, alt, and sizes. |
|
|
|
sizes="{{ delimit $sizesParts ", " }}" |
|
|
|
alt="{{ $alt }}" |
|
|
|
> |
|
|
|
{{- end }} |
|
|
|