小学社会312033 views
雑学1474609 views
いろは3033682 views
高校日本史191313 views
高校国語791051 views
教育150457 views
ヒストリア297830 views
小学理科722889 views
小学算数1205744 views
MathPython504313 views

JavaScript Lecture

Help
Tools

English

Lazy Loading in HTML img tag

The loading attribute in the __img__ tag is used to control how and when images are loaded on a webpage.
<img src="image.jpg" loading="lazy">

When an image has the loading=“lazy” attribute, the browser will defer loading the image until it is near the viewport.

This is especially useful for pages with many images that are not immediately visible. It helps reduce initial page load time and saves bandwidth, as images below the fold (the part of the page not initially visible) are not loaded until needed.