Lazy loading images and iframes
Delay offscreen files and prioritise the main image.
HTML · Lazy loading images and iframesIntermediate
<img src="hero.jpg" alt="Hero" width="1200" height="600" fetchpriority="high">
<img src="gallery-1.jpg" alt="Gallery photo 1" width="400" height="300" loading="lazy" decoding="async">
<iframe src="https://www.youtube-nocookie.com/embed/VIDEO_ID" title="Intro video" width="560" height="315" loading="lazy" allowfullscreen></iframe>loadinglazyperformancefetchpriority