How to defer the loading of images, videos and iframes

Add the loading="lazy" property to the HTML syntax of the image, video or iframe.

Oscar de la Hera Gomez
Written by Oscar de la Hera Gomez
First published on 12/30/2023 at 16:24
Last Updated on 12/30/2023 at 16:40
<p>Two flowers that represent ReactJS and GatsbyJS with the text "Lazy Load Images, Videos &amp; iFrames" beneath them.</p>

Add the loading="lazy" property to the HTML syntax of the image, video or iframe.

Subscribe

Lazy loading is a strategy to identify resources as non-blocking (non-critical) and load these only when needed.

It's a way to shorten the length of the critical rendering path, which translates into reduced page load times.

Mozilla: Lazy Loading

Examples for the images, videos or iframes are found below.

Image

&lt;img src="sample.jpg" alt="sample" loading="lazy" /&gt;

Video

&lt;video src="video.mp4" poster="sample.jpg" autoPlay playsInline muted loop preload="preload" loading="lazy" /&gt;

iframe

&lt;iframe title="title" src="url" loading="lazy" /&gt;

Looking to learn more about ReactJS and SEO ?

Search our blog to find educational content on learning ReactJS and SEO.

Search our BlogSEO Fundamentals Guide

Any Questions?

We are actively looking for feedback on how to improve this resource. Please send us a note to inquiries@delasign.com with any thoughts or feedback you may have.
SubscribeContact UsVisit our BlogView our ServicesView our Work

Partner with us

We would love to get to know you and see how we can help your organization with its goals and needs.
Let's Talk

Stay Informed

Get occasional updates about our company, research, and product launches.
Subscribe