Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi Experts,
Is there a way to upload WebM files to Shopify? If not, how can I embed WebM files instead of mp4? We want to replace our mp4 videos on the homepage with WebM files to increase site speed.
Please help. Thanks and stay safe
Solved! Go to the solution
This is an accepted solution.
Hello @EdgarPateno,
Yes, you can create an additional setting in the schema for the Youtube URL and use it in an iframe.
Add the below-provided code to your Schema settings
{
"type":"url",
"id":"video_text",
"label":"Video Url"
},
Now, add the code inside the file where you want to list the video.
For example:
<iframe class="video_text_image" width="560" height="315" src="{{ section.settings.video_url }}" loading="lazy" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Please refer to this document for adding settings to Schema. https://shopify.dev/themes/architecture/sections/section-schema
We hope you have found your solution. Feel free to reach us if you have any queries.
All the best,
CedCommerce
Hello @EdgarPateno,
“Webm” files cannot be uploaded into shopify, but you can directly use the file link in the src of video tag. Refer to the below provided code:
<video controls >
<source src="https://example.com/media/cc0-videos/flower.webm" type="video/webm">
<source src="https://example.com/media/cc0-videos/flower.mp4" type="video/mp4">
</video>
Or else, you can create a schema setting on the theme editor so you can set the webp video URL and use it in the code.
Hope it helps. Let us know if you need further help.
Regards,
Team CedCommerce
Thank you @Cedcommerce
Yes, I know that. Maybe our concern is, if we can't upload the WebM files to Shopify, how can we generate the URL of the WebM files? Is there a website that can generate the URL and host it? Hope this makes sense?
Hello @EdgarPateno,
“Webm” format video files cannot be uploaded into Shopify. For that, you need to upload your video on Youtube and “embed” it with your Shopify store page. That will work fine.
Follow the below steps to embed your Youtube video on your Shopify store page.
You can use other video-sharing platforms also, however, we recommend Youtube as it is a free and more stable platform that works easily for all.
Hope it helps. Let us know if you need more help. Take Care.
Regards,
CedCommerce
Thanks @Cedcommerce for your recommendation. I already thought of that as well, but unfortunately, the theme editor video format only accepts HTML5 MP4/OGV File URL. See below:
Is there a way on the schema to change it to YouTube or Vimeo URL?
This is an accepted solution.
Hello @EdgarPateno,
Yes, you can create an additional setting in the schema for the Youtube URL and use it in an iframe.
Add the below-provided code to your Schema settings
{
"type":"url",
"id":"video_text",
"label":"Video Url"
},
Now, add the code inside the file where you want to list the video.
For example:
<iframe class="video_text_image" width="560" height="315" src="{{ section.settings.video_url }}" loading="lazy" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
Please refer to this document for adding settings to Schema. https://shopify.dev/themes/architecture/sections/section-schema
We hope you have found your solution. Feel free to reach us if you have any queries.
All the best,
CedCommerce
Find Global Growth Opportunities For Your Business with Shopify AcademyLearn how to exp...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025