Description
For lazy-loading images, the auto keyword for the sizes attribute tells the browser to use the concrete object size to select a source from srcset, in stead of a predetermined size.
This is very useful for layouts where it is not possible to predetermine the size the image will have ahead of layout.
The specification landed a while ago, but the keyword is currently only supported in Chrome/Edge/Opera.
The auto keyword for the sizes attribute should be included in Interop 2026.
Specification
https://html.spec.whatwg.org/multipage/images.html#sizes-attributes
web-feature
https://web-platform-dx.github.io/web-features-explorer/features/sizes-auto/
Test Links
https://wpt.fyi/results/html/semantics/embedded-content/the-img-element/sizes?label=master&label=experimental&aligned&q=auto
Additional Signals
No response
Description
For lazy-loading images, the
autokeyword for thesizesattribute tells the browser to use the concrete object size to select a source fromsrcset, in stead of a predetermined size.This is very useful for layouts where it is not possible to predetermine the size the image will have ahead of layout.
The specification landed a while ago, but the keyword is currently only supported in Chrome/Edge/Opera.
The
autokeyword for thesizesattribute should be included in Interop 2026.Specification
https://html.spec.whatwg.org/multipage/images.html#sizes-attributes
web-feature
https://web-platform-dx.github.io/web-features-explorer/features/sizes-auto/
Test Links
https://wpt.fyi/results/html/semantics/embedded-content/the-img-element/sizes?label=master&label=experimental&aligned&q=auto
Additional Signals
No response