Add

Lorem ipsum

Lorem ipsum

A
A
A
SEO / GEO

3 views

4 min

How to Implement Native Lazy Loading on Iframes in Webflow

Learn how to enable native lazy loading on iframes in Webflow to improve your Core Web Vitals and reduce your pages’ initial load time.

Iframes (YouTube videos, Google Maps, embedded forms) are among the heaviest assets on a web page. Without lazy loading, they all load on the initial page load, even if the user never sees them. Sandro, cofounder of the Gemeos Webflow agency, shows you how to fix that.

Why iframes hurt your performance

By default, a YouTube iframe loads several hundred KB of scripts, styles, and assets as soon as the page opens. On a page with 2 or 3 embedded YouTube videos, that often means 1 to 3 MB of resources loaded for nothing for users who never scroll down to those elements. The impact on LCP (Largest Contentful Paint) and TBT (Total Blocking Time) is direct.

1. Turn on native lazy loading on a Webflow iframe

In Webflow, native iframes (the Video element) don’t let you add the loading attribute directly in the interface. Use an "HTML Embed" element instead and add loading="lazy" manually.

<iframe
src="https://www.youtube.com/embed/VOTRE_ID"
loading="lazy"
width="100%"
height="480"
frameborder="0"
allowfullscreen
>iframe>

2. Use the placeholder technique for YouTube

Native lazy loading delays the load, but it still loads the full iframe as soon as the user gets close. The YouTube placeholder technique is even more effective: it replaces the iframe with a static image (the YouTube thumbnail) and only loads the player on click.

<div style="position:relative;padding-bottom:56.25%;cursor:pointer;" onclick="this.innerHTML=''">
<img
src="https://img.youtube.com/vi/VOTRE_ID/maxresdefault.jpg"
loading="lazy"
style="position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;"
alt="Video title"
>
div>

Replace VOTRE_ID with the YouTube video ID (the part after "watch?v=" in the YouTube URL). Also check out our dedicated guide: reduce the weight of the YouTube video player.

good to know

The loading="lazy" attribute is natively supported by all modern browsers since 2020. You don’t need JavaScript or an external library to enable it. It also works on standard tags, but Webflow already handles that automatically for its native Image elements.

TechniqueInitial weight reductionComplexity
loading="lazy" on iframeModerateVery simple
Placeholder image + click-to-loadVery high (saves 500KB+ per video)Simple
lite-youtube-embed libraryVery highModerate

Conclusion

Lazy loading on iframes is one of the fastest performance optimizations to implement. On a page with several videos, the LCP gain can be significant.

  • Use case 1: homepage with a presentation video above the fold replaced by a placeholder
  • Use case 2: testimonials page with several client videos loaded lazily
  • Use case 3: blog posts with YouTube videos embedded in Rich Text

Good to know

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Lorem ipsum dolor sit amet consectetur.

Lorem ipsum dolor sit amet consectetur. Aliquam orci sagittis dignissim sapien praesent donec.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Published on

You might be interested in these tutorials

Similar tutorials

SEO / GEO

5 min read

5 views

How to Set Up a Redirect in Webflow? (2026)

Updated on 19.12.2025 by Sandro DA SILVA

SEO / GEO

5 min read

5 views

Add structured data to your Webflow site?

Updated on 21.08.2025 by Sandro DA SILVA

No-code

5 min read

5 views

How to Obfuscate a Link in Webflow

Updated on 23.04.2025 by Sandro DA SILVA

Let’s f*****G GO !!

Ready to launch
Your business?

Alexandre

Max

Enora

Bryan

Cannelle

Tiphaine

You'll :heart: our collaboration...