How to Stop YouTube Embeds From Slowing Down Your Site

Alexander LamAlexander Lam

The YouTube Embed is slow. It’s large, clunky, and slows down your website.

But having a video on your site is great for your users. So what are you supposed to do?

We’ve made a super fast YouTube embed code generator so that you can add YouTube to your site without slowing it down.

Best part about it? It’s completely free:

Why do you need a faster YouTube embed?

The YouTube embed is slow. It adds a whopping 2.6 MB to your website, significantly increasing its weight and your site’s load time.

With your page speed and Core Web Vitals being more important than ever, the YouTube embed can hurt your SEO.

In comparison, the Fast YouTube embedder only adds 16.8 KB to your website. Only 7 network requests are made instead of the 21 that the YouTube embed makes.

All of this translates into a faster website, better user experience, and higher search engine ranks.

How fast is your Shopify store?

Compare how fast your store is to a huge sample of other stores. Get benchmarked and find out where you can improve your speed to make more sales.

How does the Fast YouTube Embedder work?

The technology behind the fast YouTube embedder comes courtesy of Paul Irish’s Lite YouTube Embed library.

The Lite YouTube Embed does an amazing job of reducing YouTube’s impact on your website. However, it isn’t easy to use without some technical knowledge.

That’s why we made the Fast YouTube embedder. We used the Lite YouTube Embed library to load the video, and made an embeddable website that displays it with a couple more speed optimizations.

Then we hosted it on CloudFlare Pages to ensure reliability and to speed up its delivery to your visitor.

Now when a user sees a video from our Fast YouTube Embedder, they’ll see a fast loading placeholder loaded from a nearby CloudFlare server. The YouTube video only starts loading when the user chooses to play it.

How do you use the YouTube Embed code?

Adding a YouTube video to your website can be a little tricky. The key is to find the right place to put the code.

How do you embed YouTube videos in WordPress?

  1. Grab your Fast YouTube Embed code from the generator.
  2. Copy the code, and head over to your WordPress admin.
  3. Edit the Post or Page that you want to add it to.
  4. How you add the embed code depends on your WordPress editor type:
    • If you’re using the WordPress classic editor, click the Text tab at the to right of your editor. Paste the embed code anywhere here.
    • If you’re using the WordPress Gutenberg editor, add a new block. Select the Custom HTML block. Paste the embed code here.

How do you embed YouTube videos in Shopify?

  1. Get your embed code from the Fast YouTube Embed generator
  2. Copy your embed code, and head over to your Shopify admin.
  3. Edit the Product, Page or Blog Post that you want to add the video to.
  4. Click on the Insert Video button, which looks like this: video button
  5. Paste your embed code in this box, and click Insert Video.

How do you embed YouTube videos on a SquareSpace website?

  1. Copy your embed code from the Fast YouTube Embed generator
  2. Head over to your SquareSpace dashboard, and click on Pages.
  3. Select the Page you want to edit, and click the Edit button.
  4. Click the Plus button on the area you want to add your video to. Select Embed.
  5. Click the Code button, it looks like this: </>
  6. Paste your embed code, and click Done > Save to publish your page.

How do you embed YouTube videos on a Wix website?

  1. Generate your Fast YouTube Embed code and copy it.
  2. From your Wix Dashboard, click on Edit Site on the site you want to edit.
  3. Click on the plus button to Add Strip to the area you want your video to appear.
  4. Select Embed > Custom Embeds > Embed a Widget. Click Add to Site.
  5. Click Enter Code, and paste your embed code.
  6. Click Apply, and click Publish.

Go forth and save your PageSpeed!

That’s all there is to it. Replace your YouTube videos with our Fast YouTube Embeds to fix up your PageSpeed and Core Web Vitals. YouTube videos are often some of the biggest contributors to a slow site, so don’t procrastinate on this.

If you have any questions or run into any issues, feel free to leave a comment below!

How fast is your Shopify store?

Compare how fast your store is to a huge sample of other stores. Get benchmarked and find out where you can improve your speed to make more sales.

Comments 2
  • Matt Jackson
    Posted on

    Matt Jackson Matt Jackson

    Reply Author

    Hi, I’ve tried this out, but 2 of my videos show no thumbnail previews, any idea why this is?


    • Alex Lam
      Posted on

      Alex Lam Alex Lam

      Reply Author

      Hey Matt, this is a bug with YouTube where they sometimes fail to generate the thumbnail that we use.

      To generate the thumbnail, go into the Video Manager (found under Creator Studio), change the thumbnail to one of the original 3 defaults generated by YouTube, save it, leave the page, and then change back to the original thumbnail.