How to Replace a YouTube Embed With a Click-to-Load Thumbnail

Swap the YouTube embed for a light stand-in: an image with a play button. Load the real player only when a visitor clicks. web.dev calls this stand-in a facade. In Webflow, it needs a Code Embed element, because the YouTube element has no such setting.

Read time:
2 minutes
Author:
Nemanja Hrnjez
Published:
November 11, 2026
How to Replace a YouTube Embed With a Click-to-Load Thumbnail

Is your Webflow site slow, costly or hard to find?

Send me your site

Why it matters

web.dev says many popular embeds include over 100 KB of JavaScript, sometimes up to 2 MB. They take longer to load and keep the main thread busy.

A facade is a static element that looks like the embed but does not work. web.dev says YouTube facades are images with a play button. The video loads only when clicked. On mouseover, the facade preconnects to the provider.

There are trade-offs. A facade lacks the full function of the real embed. web.dev says autoplay may not work consistently for lazily loaded videos.

Webflow's YouTube article gives no lazy-load or performance guidance. So the speed work is yours to do.

How to check it

  1. List your embeds. Check each page for YouTube elements and iframes inside Code Embed elements.
  2. Check position. Is the video at the top of the page or far below?
  3. Check the Network tab. Reload the published page in Chrome DevTools. Look at what YouTube loads before anyone clicks.
  4. Check the privacy setting. Webflow says Privacy Enhanced Mode serves videos from youtube-nocookie.com and uses no tracking cookies. Check which domain your embed uses.
  5. Run PageSpeed Insights. Compare mobile and desktop. Check whether the video is the LCP element.
  6. Check for layout shifts. web.dev says to set width and height on iframes so the browser can reserve space.
  7. Check autoplay. If the video autoplays, a facade may change that.
  8. Check your plan. Custom code needs a Core, Growth, Agency or Freelancer Workspace, or a site with an active Site plan.

How to fix it in Webflow

  1. Try the simple fix first. web.dev says adding loading="lazy" to YouTube's embed code can save approximately 500 KB on the initial page load. It defers loading until the iframe nears the viewport. Browsers that do not support it ignore it.
  2. Use a facade for videos that few visitors play. This is the bigger saving. Nothing from YouTube loads until a click.
  3. Pick an open-source facade. web.dev recommends lite-youtube-embed. It also lists lite-youtube and lazyYT. Read the library's own instructions. They are outside the sources used for this post.
  4. Remove the old embed. Delete the YouTube element or the iframe from the page.
  5. Add a Code Embed element. Use Quick find (Cmd or Ctrl + E) or the Add panel, under Custom Code. Paste the facade code from your chosen library. Webflow says this element goes on the canvas.
  6. Reserve the space. Place the embed in a div block with a fixed aspect ratio, so the page does not jump when the player loads.
  7. Keep the privacy choice. If you used Privacy Enhanced Mode before, check that the real player still loads from youtube-nocookie.com after the click.
  8. Publish. Webflow says custom code appears only on the published site, not in the Designer.
  9. Test the click. Open the live page. Click the thumbnail. Confirm the video plays.
  10. Test the load. In the Network tab, confirm YouTube requests happen only after the click, or after the mouseover preconnect.
  11. Run PageSpeed Insights again. Compare with your first run.
  12. Keep one real embed if needed. If a video must autoplay, a facade may not suit it.

Checklist

  • Every YouTube embed is listed.
  • Videos below the fold use lazy loading or a facade.
  • Videos nobody plays are not loading anything early.
  • The facade comes from a library you checked.
  • The old embed is removed.
  • Space is reserved, with no layout jump.
  • The privacy mode is still in place.
  • The live page was tested by clicking.
  • The Network tab shows no early YouTube requests.
  • PageSpeed Insights was re-run.

FAQ

Does a facade hurt video playback?

It can change it. web.dev says a facade lacks the full function of the real embed. It also says autoplay may not work consistently for lazily loaded videos.

Is loading="lazy" enough?

For many pages, it may be. It defers loading until the iframe nears the viewport. A facade goes further. Nothing loads until the click.

Can I do this with Webflow's YouTube element?

Webflow's article lists settings for start time, mute, autoplay, controls, privacy mode and related videos. It does not list lazy loading or a facade. Use a Code Embed element for that.

Dealing with this on a live Webflow site? It is the kind of work I do in Bandwidth. Send me your site and I will tell you what I would fix first.

← All articles

Start with what's wrong.

Send your site URL. I'll reply within one business day with what I'd fix first.