<img sizes="auto" loading="lazy">
Limited availability
The sizes="auto" attribute for the <img> HTML element sets the layout size for the image based on the computed layout size when choosing a source from the srcset. This attribute only applies to images with the loading="lazy" attribute.
Browser support
- Chrome 126 Released on 2024-06-11
- Chrome Android 126 Released on 2024-06-11
- Edge 126 Released on 2024-06-13
- Firefox 150 Released on 2026-04-21
- Firefox for Android 150 Released on 2026-04-21
- Safari Not supported Bugs: 253143
- Safari on iOS Not supported Bugs: 253143
Baseline availability blocked since April 2026 by Safari (3 months)
Need this feature?
Leave a 👍 on the feedback issue
Don't forget to also leave a comment explaining your specific use case.
MDN documentation
Specifications
- HTML (#valdef-sizes-auto), from HTML Workstream (WHATWG).
Usage (according to Chrome Platform Status)
~0.932% of page loads. More data at chromestatus.com.Web Platform Tests (WPT)
View the latest WPT test results for this featureView as JSON | Edit this feature | Report an issue | Web-features entry: source, dist