Comments on: YouTube Embeds are Bananas Heavy and it’s Fixable https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/ Helping Your Journey to Senior Developer Mon, 29 Jul 2024 13:19:20 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: Nigel https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/#comment-8158 Mon, 29 Jul 2024 13:19:20 +0000 https://frontendmasters.com/blog/?p=2881#comment-8158 In reply to Evan.

I have updated Responsive Video Poster to add the Youtube embed API if needed so users dont have to double click to play the video. https://nigelotoole.github.io/responsive-video-poster/

]]>
By: Matt https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/#comment-7253 Mon, 15 Jul 2024 15:36:07 +0000 https://frontendmasters.com/blog/?p=2881#comment-7253 This is a solution for Drupal folks:

https://www.drupal.org/docs/contributed-modules/oembed-lazyload

]]>
By: Taj https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/#comment-6971 Wed, 10 Jul 2024 20:06:46 +0000 https://frontendmasters.com/blog/?p=2881#comment-6971 In reply to Evan.

Maybe I’m missing something but can’t this be fixed by adding &autoplay=1 to the URL so that it plays when it loads?

]]>
By: Jeroen Peters https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/#comment-6921 Tue, 09 Jul 2024 19:28:25 +0000 https://frontendmasters.com/blog/?p=2881#comment-6921 I made some effort for Django to do the some thing, getting the video image and insert the embed on click (https://pypi.org/project/djangocms-youtube-lazyload/), but this is even more brilliant as it doesn’t require getting the YouTube api key, which is a tedious task to say the least

]]>
By: Chris Coyier https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/#comment-6851 Mon, 08 Jul 2024 14:38:54 +0000 https://frontendmasters.com/blog/?p=2881#comment-6851 In reply to Evan.

Ah you’re right! I hadn’t realized that. That is indeed a deviation in behavior for the worse. Arm chair commentary, I’d say it’s still worth it, but that actual decision would have to be weighed in context of a real site.

]]>
By: Ed Sawicki https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/#comment-6849 Mon, 08 Jul 2024 14:31:24 +0000 https://frontendmasters.com/blog/?p=2881#comment-6849 In reply to Jan.

This is what I do. Plus, I can choose the image used for the poster image and I use Imagemagick to superimpose the play icon.

]]>
By: Evan https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/#comment-6848 Mon, 08 Jul 2024 14:23:40 +0000 https://frontendmasters.com/blog/?p=2881#comment-6848 The only issue I’ve run into with these kind of poster stand-ins, is that you have to click the play button twice on mobile (Safari, iOS). Once to load the YouTube player, and then again on the player itself. It’s not the end of the world, I just wish there was a completely perfect solution.

]]>
By: Jan https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/#comment-6785 Sun, 07 Jul 2024 19:02:53 +0000 https://frontendmasters.com/blog/?p=2881#comment-6785 Another idea, show the poster image with a play icon on top with a standard HTML link so it opens the video on YouTube. Even lighter, no JavaScript and… no Google tracking as long as you don’t click the link!

]]>
By: Chris Coyier https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/#comment-6574 Tue, 02 Jul 2024 17:30:44 +0000 https://frontendmasters.com/blog/?p=2881#comment-6574 In reply to Farai.

That’s it, thanks!

]]>
By: Farai https://frontendmasters.com/blog/youtube-embeds-are-bananas-heavy-and-its-fixable/#comment-6573 Tue, 02 Jul 2024 17:29:56 +0000 https://frontendmasters.com/blog/?p=2881#comment-6573 I should work on getting this implemented in Hugo.

As for the link on how YouTube’s attempts to reduce performance increased average load times, That’s this post Page Weight Matters by Chris Zacharias (https://blog.chriszacharias.com/page-weight-matters).

]]>