A YouTube embed pulls in the player’s own scripts and a preview thumbnail the moment it loads, and on a page with several videos that adds up quickly. Here is how to keep things fast without giving up embedded video.
Why embeds affect page speed
Even before a visitor presses play, an embedded iframe requests YouTube’s player resources and a thumbnail image. On a review page with five embedded videos, for example, that is five sets of requests firing at once on page load, competing with your own site’s resources for bandwidth and rendering time.
Fix 1: native lazy-loading
The simplest fix is a single HTML attribute. Adding loading=”lazy” to an <iframe> tells the browser to defer loading it until it is about to scroll into view:
<iframe src="..." loading="lazy" ...></iframe>
This is supported by all modern browsers, requires no JavaScript, and is the single highest-value change for a page with embedded video below the fold.
Fix 2: click-to-load
For pages with many embeds, an even more aggressive option is to not load any iframe at all until a visitor clicks it. Show a static thumbnail image, pulled from YouTube’s public thumbnail URLs (see our thumbnail viewer), with a play button overlay, and only swap in the real iframe on click. This means zero YouTube requests happen for videos a visitor never actually plays.
Fix 3: only autoplay what needs it
Autoplaying video adds real work the moment the page loads: the player has to buffer immediately rather than waiting for user intent. Reserve autoplay for genuinely important embeds, and rely on lazy-loading plus a visible play button for the rest.
Measuring the impact
Tools like Google PageSpeed Insights or your browser’s own Lighthouse panel will flag unoptimised third-party embeds directly, and let you compare before-and-after load times once lazy-loading is applied. On pages with multiple videos the difference is usually easy to see in both the numbers and the perceived load feel.
Built in by default
Our embed code generator includes loading=”lazy” by default on every generated embed, so this optimisation is already handled the moment you copy the code.