Remove the sizes attribute

It defaults to 100vw, which may be wasteful sometimes, but it guarantees
smooth experience. I am not aware of any simple way of requesting the
current widescreen behavior "make it as wide as possible while not
exceeding 30rem height" using the sizes attribute.

This setting may be especially wasteful for portrait images, as their
rendered width will be much smaller than the viewport width.
This commit is contained in:
Vojtěch Káně 2020-05-03 14:55:51 +02:00
parent 5be48c59c6
commit 058de79991

View File

@ -46,6 +46,6 @@ where possible named params are:
{{- end -}} {{- end -}}
<figure> <figure>
<img src="{{ $largest.RelPermalink }}" alt="{{ $alt }}" srcset="{{ delimit $srcset ", " }}" sizes="(orientation: portrait) 100vw, 50vw"> <img src="{{ $largest.RelPermalink }}" alt="{{ $alt }}" srcset="{{ delimit $srcset ", " }}">
{{ if (ne $caption false) }}<figcaption>{{ $caption }}</figcaption>{{ end }} {{ if (ne $caption false) }}<figcaption>{{ $caption }}</figcaption>{{ end }}
</figure> </figure>