YouTube Video For Shopify

Solved
Irena
Pathfinder
127 1 28

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)

Accepted Solutions
JoesIdeas
Shopify Expert
1790 157 473

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 (app to save time + automate tasks, monitor orders, tag, fulfill, FBA)
• Shopify developer for +10 years
• Contributor on the Speed Boostr blog
• Guy who likes to help people

View solution in original post

Nick
Shopify Staff (Retired)
Shopify Staff (Retired)
4531 434 1002

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

 

Nick | Community Moderator @Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

View solution in original post

Replies 3 (3)
JoesIdeas
Shopify Expert
1790 157 473

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 (app to save time + automate tasks, monitor orders, tag, fulfill, FBA)
• Shopify developer for +10 years
• Contributor on the Speed Boostr blog
• Guy who likes to help people
Nick
Shopify Staff (Retired)
Shopify Staff (Retired)
4531 434 1002

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

 

Nick | Community Moderator @Shopify
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit the Shopify Help Center or the Shopify Blog

Irena
Pathfinder
127 1 28

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).