loading images js code example
Example 1: how to make images load as you scroll down
<img loading="lazy" src="https://example.com" />
Example 2: how to add lazy loading in html
lazy loading in html
<img src="myimage.jpg" loading="lazy" alt="..." />
<iframe src="content.html" loading="lazy"></iframe>