I’m trying to embed a Shopify self-hosted video with autoplay and loop into my product description.
Embedding videos in Shopify descriptions can be tricky due to dynamic rendering. Are you looking to add a different video to each product description, or do you want to manage one video from the admin panel for multiple products?
yes in this case is a different video for every product
Embedding videos in such case can be tricky but achievable:
- Go to Settings > Files, upload your video, and copy its URL.
- In the product’s Description, switch to HTML view (</>).
- Add this code (autoplay, muted version), replacing the URL:
Repeat for each product.
I haven’t tested it myself, but it should work! Tune if needed.
wow works really good thanks, how can i add lazy loading so it doesnt affect a lot charging speed?
And the controls too, ik it has to be muted to be autoplayed but can i add the video controls to unmuted if wanted?
Glad it worked! To add lazy loading and controls:
- For lazy loading, add loading=“lazy” to the
- For controls, add the controls attribute. It’ll let users unmute after the muted autoplay starts.
Be sure to properly encode your videos before uploading. HandBrake (handbrake.fr) is an excellent tool for this.
Feel free to reach out directly if you’d like to boost your conversion rates with video - we do it really well!