How to embed a video on Shopify without YouTube

Add a product video or homepage video to a Shopify store with the Custom Liquid section. Works with Dawn and other Online Store 2.0 themes, no app needed.

yourblog.com/our-trip 4K <iframe src="vidlify.to/e/…" allowfullscreen ></iframe>

Shopify's built in Video section takes a YouTube or Vimeo link or a file uploaded to Shopify. A YouTube video brings its logo and suggested videos from other channels onto your product page, which is the last thing you want next to a buy button. Any other host works through the Custom Liquid section, which accepts plain HTML like an iframe.

Before you start

Upload the video to Vidlify (free with 30 GB of storage), open it and copy the embed code under Share and embed. Take the responsive version: it fills the width of the section and keeps the 16:9 shape on phones too.

Homepage or any page

  1. In the Shopify admin go to Online Store, then Themes, and click Customize.
  2. Pick the page at the top (Home page, a product template, a page template).
  3. Click Add section where the video should go and choose Custom Liquid.
  4. Paste the embed code into the Liquid code field.
  5. Click Save.

Inside a product page

On product templates you can also add Custom Liquid as a block inside the product information section, so the video sits right under the description or the buy buttons:

  1. In the theme editor, open a product template.
  2. In the Product information section click Add block and choose Custom Liquid.
  3. Paste the embed code and drag the block where you want it.
  4. Save.

The block shows on every product that uses this template. For a different video per product, create a second product template and assign it to those products.

Useful options

Add these to the address in the src attribute:

  • ?autoplay=1&muted=1 starts the video automatically, muted. Browsers only allow autoplay without sound (why).
  • ?t=30 starts it at second 30.

Keep the video on your store

Under Allow embedding only on these domains in the video's settings you can lock the video to your store. Enter your own domain and your yourstore.myshopify.com address. The theme editor runs your store inside the Shopify admin, so a locked video may stay black in the editor preview. Check the live store instead (how the lock works).

Troubleshooting

  • Everything below the video disappeared: the code was pasted incomplete. Copy it again and paste the whole thing, from <div or <iframe to the closing tag.
  • The video is too wide or too small on phones: use the responsive version of the embed code instead of the fixed size.
  • There is no Custom Liquid section: older themes (before Online Store 2.0) don't have it. There you paste the code into a page's content with the Show HTML button (<>) of the rich text editor.
  • The video is a big MOV file from your phone: that's fine, it plays in the browser after upload. Read video formats explained if you want smaller files.
Share this article

Keep reading