Videos can be a powerful part of your website hey capture attention, tell stories, and increase engagement. But if you’ve ever embedded a YouTube or Vimeo video in Webflow, you’ve probably noticed something frustrating: your page speed drops.
Videos can be a powerful part of your website — they capture attention, tell stories, and increase engagement. But if you’ve ever embedded a YouTube or Vimeo video in Webflow, you’ve probably noticed something frustrating: your page speed drops.
That’s where lazy loading comes in. It’s a simple technique that helps videos load only when needed, keeping your website fast and your core web metrics happy.
In this post, I’ll show you how I lazily load videos in Webflow without sacrificing performance or user experience.
When you embed a video directly into a page using an <iframe>, the browser loads:
All of this happens before the user even views the video, slowing down the initial load.
Lazy loading avoids this by delaying the video loading until:
This means:
One of the most effective ways to lazy load a video is to replace the iframe with a thumbnail and load the actual video with just a click.
Step 1: Embed HTML block
Step 2: Custom script (in the footer)
Use a high-resolution thumbnail and preload it for a smoother UX.
This method automatically loads videos only when they enter the viewport.
Wrap your video in a div with the data-src attribute
When the user scrolls to it, JavaScript injects an iframe
This method is best when you want autoplay on scrolling or there is no manual play button.
When you dynamically load an iframe, it can shift other content — which hurts your CLS (Cumulative Layout Shift) score.
Use a container with a fixed aspect ratio to “reserve” space for the video:
This ensures that the layout remains stable while the video loads.
Lazy loading videos in Webflow is one of the easiest ways to:
Whether you’re showcasing a product demo or a background video hero section, using one of the methods above will help you bring your designs to life without sacrificing speed.