いろは2986023 views
教育148875 views
高校倫理1433119 views
中学理科1626207 views
高校化学2913383 views
MathPython491378 views
Computer365120 views
小学算数1194618 views
中学社会667106 views
高校生物549842 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.