Can I upload or embed WebM files instead of MP4?

Solved

Can I upload or embed WebM files instead of MP4?

EdgarPateno
Shopify Partner
59 0 5

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

Accepted Solution (1)
Cedcommerce
Shopify Partner
718 76 113

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

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here

View solution in original post

Replies 5 (5)

Cedcommerce
Shopify Partner
718 76 113

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

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here
EdgarPateno
Shopify Partner
59 0 5

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?

Cedcommerce
Shopify Partner
718 76 113

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.

  • Go to your Youtube video.
  • Click on Share and then click on Embed.
  • Once you click on Embed you will get a code.
  • Copy that code and paste it into the edit code of the section where you want to link the video.

 

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

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here
EdgarPateno
Shopify Partner
59 0 5

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:

EdgarPateno_0-1657724851401.png

 

Is there a way on the schema to change it to YouTube or Vimeo URL?

 

Cedcommerce
Shopify Partner
718 76 113

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

CedCommerce || Shopify Expert
- Let us know if our reply is helpful for you. Like it.
- Was your question answered? Mark it as an accepted solution.
- For further discussion contact: Email ID- apps@cedcommerce.com
- Whatsapp:- Join Here