Title: YouTube slow down (third party javascript)
Last modified: February 21, 2021

---

# YouTube slow down (third party javascript)

 *  Resolved [cloudcreatr](https://wordpress.org/support/users/cloudcreatr/)
 * (@cloudcreatr)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/youtube-slow-down-third-party-javascript/)
 * I just embedded a single YouTube video which has slowed down the page tremendously
 * I am using the elementor and wp rocket 🚀
 * And tried the wp rocket lazy load the iframe and but didn’t work amd also tried
   to place a image overlay in elementor
 * Didn’t work what to do
 * Please help
 * Thanks
 * (Please check the page Speed insight results for this page )
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fyoutube-slow-down-third-party-javascript%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/youtube-slow-down-third-party-javascript/#post-14078906)
 * What you’ve just described is normal. A YouTube embed is not just a video, but
   it’s also all of the javascript and trackers from YouTube as well.
 * That’s the trade-off.
 * The good news is, it wasn’t that big of an impact, since the page loads in 1.9
   seconds: [https://gtmetrix.com/reports/www.cloudcreatr.com/3aMgqqyL/](https://gtmetrix.com/reports/www.cloudcreatr.com/3aMgqqyL/)
 *  Thread Starter [cloudcreatr](https://wordpress.org/support/users/cloudcreatr/)
 * (@cloudcreatr)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/youtube-slow-down-third-party-javascript/#post-14079540)
 * But if I could reduce YouTube it would be a drastic change
 * It shows in Google page Speed insight
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/youtube-slow-down-third-party-javascript/#post-14080158)
 * The only way to “reduce YouTube” is to not embed YouTube.
 *  Thread Starter [cloudcreatr](https://wordpress.org/support/users/cloudcreatr/)
 * (@cloudcreatr)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/youtube-slow-down-third-party-javascript/#post-14080245)
 * The story starts with a issue called as ‘reduce the impact of third-party code
   in page Speed insight
 * This occurred when I embedded the YouTube video on my page with elementor video
   widget
 * This drastically reduced my speed and score in page Speed insight
 * Screenshot of the error
    [https://drive.google.com/file/d/17d8NYnJ06G9VRcLZpvtr_ojqjs7Cbav5/view?usp=drivesdk](https://drive.google.com/file/d/17d8NYnJ06G9VRcLZpvtr_ojqjs7Cbav5/view?usp=drivesdk)
 * After researching I came across some plugin like wp youtube lyte and wp rocket
   🚀
 * I use wp rocket
 * There’s a option in wp rocket to replace the YouTube iframe with preview image,
   which I turned on
 * But unfortunately it didn’t worked for me,
 *  I even used wp youtube lyte but no change in speed and score it was still worse
 * There’s was no change in speed after I turned the video optimization in respectively
   plugins
 * The page was build with elementor
 * Then I started to test
 * In test 1
 * (Wp rocket ‘YouTube iframe with preview image’ was turned on)
 * I made a page (blank canvas) with the native wordpress editor and only embedded
   the YouTube video(only pasted the link in Gutenberg block editor and published),
 * then I saw that the Google page insight score were amazing and there were no 
   issues about the third party code impact
 * After that
 * I removed the option/turn off the option in wp rocket about replace the YouTube
   iframe with preview image.
 * The score went worse and it showed the issue of third-party impact
 * Still I am using the blank canvas build in test 1
 * Then I again turned the option on and Page speed insight score improved
 * Screenshot
    [https://drive.google.com/file/d/17YpQ_j8IhFd3OhYgayUGqPa-Cm3vnNyd/view?usp=drivesdk](https://drive.google.com/file/d/17YpQ_j8IhFd3OhYgayUGqPa-Cm3vnNyd/view?usp=drivesdk)
 * This tells that the wp rocket and wp YouTube lyte was working properly
 * Test 2
 * This time I created a blank page with elementor and I embedded only the YouTube
   video using the video widget in elementor and this time the wp rocket ‘replace
   the YouTube iframe with preview image’ was turned on
 * I checked the scores and I found the score and speed were still worse and showed
   the error
 * Reduce the impact of third-party code
 * Screenshot of the error
    [https://drive.google.com/file/d/17d8NYnJ06G9VRcLZpvtr_ojqjs7Cbav5/view?usp=drivesdk](https://drive.google.com/file/d/17d8NYnJ06G9VRcLZpvtr_ojqjs7Cbav5/view?usp=drivesdk)
 * This show that there’s something bug in the elementor video widget that doesn’t
   allow wp rocket and wp YouTube lyte to optimise the YouTube video for speed or
   replace the iframe
 * Hope you understand
 * Please 🙏 anybody fix this issue
 * I embedd a lot of video and I use elementor
 * Inspite of turning on the optimization options (replace YouTube iframe with preview
   image) in wp rocket
 * elementor video widget slow down the website
    And shows the error in page Speed
   insight
 * There’s is a way around for this issue/alternative
 * Use text editor widget in elementor
    Place the link of YouTube video directly
   in the text editor Then YouTube video will be embedded Then it will be optimised
   by wp rocket
 * But there’s no much styling option
    It’s not well optimised in terms of design
   You can use the features you get in video widget elementor
 * Please fix this issue as soon as possible
    Eagerly waiting for your reply
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/youtube-slow-down-third-party-javascript/#post-14081406)
 * > The story starts with a issue called as ‘reduce the impact of third-party code
   > in page Speed insight
   > This occurred when I embedded the YouTube video on my page with elementor video
   > widget
 * That’s because YouTube’s embed includes its own cookies from youtube.com, which
   now run on your site, and are therefore third-party cookies.
 * —
 * Anyway, I recommend taking a step back. I read everything you wrote, but at the
   end of the day it’s a lot to say that you did indeed embed a YouTube video, and
   you got all of the junk that YouTube includes with their embeds.
 * This is _not_ an issue, this is how YouTube works.
 * If you want to embed a video without all of YouTube’s junk, upload the video 
   to your site instead, then it will be just the video and WordPress’s light built-
   in player: [https://wordpress.org/support/article/video-block/](https://wordpress.org/support/article/video-block/)
 * If you embed a YouTube video though, you’re going to get everything that YouTube
   sends with it.
 *  Thread Starter [cloudcreatr](https://wordpress.org/support/users/cloudcreatr/)
 * (@cloudcreatr)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/youtube-slow-down-third-party-javascript/#post-14081704)
 * If I don’t embedd the YouTube videos on my site then I will not be able to drive
   site traffic to YouTube
 * Also a lot of bandwidth will be consumed
 * I used the way around mentioned above and it solved the issue Temperly
 * But elementor needs to fix the video widget
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/youtube-slow-down-third-party-javascript/#post-14081774)
 * Ok, topic continues at [https://wordpress.org/support/topic/youtube-player-slow-down-the-website/](https://wordpress.org/support/topic/youtube-player-slow-down-the-website/)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘YouTube slow down (third party javascript)’ is closed to new replies.

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 7 replies
 * 2 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/youtube-slow-down-third-party-javascript/#post-14081774)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
