Lazy-loading images and iframes
Newly available since 2023-12-19
The loading="lazy"
attribute for <img>
and <iframe>
elements blocks loading the external resource until the user scrolls to that element's part of the page.
To learn more, see
HTMLIFrameElement: loading property,
HTMLImageElement: loading property at MDN.
Compatibility (view on caniuse.com)
- Chrome 77 Released on 2019-09-10
- Chrome Android 77 Released on 2019-09-10
- Edge 79 Released on 2020-01-15
- Firefox 121 Released on 2023-12-19
- Firefox for Android 121 Released on 2023-12-19
- Safari 16.4 Released on 2023-03-27
- Safari on iOS 16.4 Released on 2023-03-27
Specifications
- HTML Standard (#lazy-loading-attributes), from HTML Workstream (WHATWG).