<img sizes="auto" loading="lazy">
Limited availability
The sizes="auto"
attribute for the <img>
HTML element reserves layout space for an image before it loads, avoiding some layout shifts. This attribute only applies to images with the loading="lazy"
attribute.
Learning resources on MDN
No MDN documentation found. You can search for the feature on MDN. If you believe that MDN has no documentation about this feature, you can open an issue on MDN's GitHub repository.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 ❌ See bugzil.la/1819581
- Firefox for Android ❌ See bugzil.la/1819581
- Safari ❌ See webkit.org/b/253143
- Safari on iOS ❌ See webkit.org/b/253143
Specifications
- HTML (#valdef-sizes-auto), from HTML Workstream (WHATWG).
View web-platform-tests results for this feature - View the feature source file (dist) - Edit the feature - Report an issue about this feature