DEV Community


Posted on

Lazy load images, native solution, no javascript or plugins

Browsers now have native functionality to lazy load images.
Just add the loading attribute to your images:

<img loading="lazy" />
Enter fullscreen mode Exit fullscreen mode

More useful img properties/attributes:

Browser support:

Remember as a developer it is your duty to use these new features. Do not support browsers that do not have these features (like IE) as that is counter intuitive and holds us as a community back. If more developers stopped developing for crappy browsers, clients wouldnt expect us to code for them and we can enjoy the ease of features like the above.

Top comments (2)

shawnwildermuth profile image
Shawn Wildermuth

Yeah, blame the developers. That's a good idea

greggcbs profile image

Okay, so then who should push for new feature adoption if not the very people that want to use those new features?