Omit maxwidth size if no sizes

master
Will Faught 2 years ago
parent 70c74bdb56
commit 128d1c3c0d

@ -216,11 +216,13 @@
{{ $srcset = $srcset | append (printf "%s %dw" $resized.RelPermalink $imagewidth) }}
{{ end }}
{{ if $sizes }}
{{ $sizes = $sizes | append (print $maxwidth "px") }}
{{ $sizes = delimit $sizes ", " }}
{{ $srcset = delimit $srcset ", " }}
{{ end }}
{{ end }}
{{ end }}
{{ else }}
{{ $src = relLangURL $src }}
{{ end }}

Loading…
Cancel
Save