4 ms·
yes, there is already <img loading="lazy" ... /> simply add the property to your html images and the browser will automatically load them when in the viewport
by kmlx 6y ago
yes, there is already
<img loading="lazy" ... />
simply add the property to your html images and the browser will automatically load them when in the viewport (i.e. just the ones you actually see)
further details:
https://caniuse.com/#feat=loading-lazy-attr https://caniuse.com/#feat=loading-lazy-attr
https://html.spec.whatwg.org/multipage/urls-and-fetching.html#lazy-loading-attributes https://html.spec.whatwg.org/multipage/urls-and-fetching.htm...
- Wowfunhappy 6y agoBut then they always seem to not come in until I scroll to them, which is too late and just means I have to wait even more! What they ought to do is download as soon as the network is quiet.