Does compressing a YouTube video affect Shopify site speed?

Solved

Does compressing a YouTube video affect Shopify site speed?

Irena
Pathfinder
127 1 30

Hello,

Do I still need to compress the video if I upload it to YouTube to use on Shopify? Will it have impact on site's speed? Sorry, if my question is stupid.

Thanks!

Accepted Solutions (2)

JoesIdeas
Shopify Partner
2325 211 616

This is an accepted solution.

Youtube videos are already compressed on their platform, but videos are large files so they do affect site speed.

There are a couple ways you can minimize the impact:

1) Lazy load the video so that it does load until the user scrolls into view. This will save some resources (for the video), but will still have the embedded youtube scripts loading on the page. To lazy load the video, you do this the same as with lazy loading images. This guide will help: https://speedboostr.com/shopify-lazy-loading/

2) You can prevent all the resources from the video loading by using a tactic we call Deferred Video Loading. This prevents the video and the related youtube resources from loading at all during page load, by replacing the embedded youtube video with a static image. Then when the user clicks on the image, it then pulls in the embedded youtube and allows them to play it. This guide will help you achieve that: https://speedboostr.com/deferred-video-loading/

 

• Creator of Order Automator (automate tagging, fulfillment, Amazon, notifications + more)
• Shopify developer for 10+ years, store owner for 7 years
• I also make guides like Shopify Automation Tips and How to Figure Out Why You're Not Getting Sales

View solution in original post

Nick
Shopify Staff (Retired)
4531 434 1026

This is an accepted solution.

Hi @Irena,

That's a great question to be honest, not a stupid question at all! 

@JoesIdeas has giving you some great information there. Shopify also has a help guide for adding different media types such as videos which you also might find valuable or useful.

13-18-6mr82-6wijh

You can read the full guide here

 

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Replies 3 (3)

JoesIdeas
Shopify Partner
2325 211 616

This is an accepted solution.

Youtube videos are already compressed on their platform, but videos are large files so they do affect site speed.

There are a couple ways you can minimize the impact:

1) Lazy load the video so that it does load until the user scrolls into view. This will save some resources (for the video), but will still have the embedded youtube scripts loading on the page. To lazy load the video, you do this the same as with lazy loading images. This guide will help: https://speedboostr.com/shopify-lazy-loading/

2) You can prevent all the resources from the video loading by using a tactic we call Deferred Video Loading. This prevents the video and the related youtube resources from loading at all during page load, by replacing the embedded youtube video with a static image. Then when the user clicks on the image, it then pulls in the embedded youtube and allows them to play it. This guide will help you achieve that: https://speedboostr.com/deferred-video-loading/

 

• Creator of Order Automator (automate tagging, fulfillment, Amazon, notifications + more)
• Shopify developer for 10+ years, store owner for 7 years
• I also make guides like Shopify Automation Tips and How to Figure Out Why You're Not Getting Sales

Nick
Shopify Staff (Retired)
4531 434 1026

This is an accepted solution.

Hi @Irena,

That's a great question to be honest, not a stupid question at all! 

@JoesIdeas has giving you some great information there. Shopify also has a help guide for adding different media types such as videos which you also might find valuable or useful.

13-18-6mr82-6wijh

You can read the full guide here

 

To learn more visit the Shopify Help Center or the Community Blog.

Irena
Pathfinder
127 1 30

Thank you, @JoesIdeas and @Nick for your replies! It's very useful. @JoesIdeas, I think videos on new Dawn theme work the way you mentioned in point 2), since when I upload videos there I also can add the cover images (static images).