Easy Tutorial
❮ Tag Nav Att Global Data ❯

HTML <img> loading Attribute

HTML <img> Tag

Example

Several images at the bottom of the page are set to lazy load, only displaying when the mouse scrolls to their position:


Browser Support

Attribute
loading 77.0 79.0 75.0 Not Supported 64.0

Definition and Usage

The loading attribute specifies whether the browser should load the image immediately or delay loading until it is needed.

Setting loading="lazy" will cause the image to only display when the mouse scrolls to its position.


Syntax

<img decoding="async" src="URL" loading="eager|lazy">

Attribute Values

Value Description
eager Default, the image loads immediately.
lazy The image loads lazily, only displaying when the mouse scrolls to its position.

❮ Tag Nav Att Global Data ❯