Online store performance and site speed optimization
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!
Solved! Go to the solution
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/
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.
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
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/
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.
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
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).
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023