Site icon javaniceday.com

Image lazy loading natively

Reading Time: < 1 minutes

These days, image lazy loading is an important technique to improve performance on web applications. Image lazy loading simply loads images asynchronously, so that they appear on the page only when the user scrolls close to them.

Natively supporting lazy loading for images makes the user experience much better and also helps optimize performance. Let’s see how to implement image lazy loading natively with just one attribute from the image HTML tag.

      
<img src="image.jpg" alt="..." loading="lazy" />
      
    

Reference

Exit mobile version