Log in
Log into community
Welcome to the Liquify Community
New post
View all posts
Related posts
Was this helpful?
π
π
π
Powered by
Hall
Active
Updated 2 days ago
0
Follow
Render video from product media
Render video from product media
Active
0
Follow
K
Kevin
4 days ago
Β·
How can I render a video in the product media on the product page?
j
K
6 comments
Share
Open in Discord
j
jonas.halbstark
edited 4 days ago
Hi @Kevin, instead of looping over the images you can also loop over the media:
https://shopify.dev/docs/api/liquid/objects/product#product-media
li-for="media in product.media"
j
jonas.halbstark
4 days ago
https://preview.webflow.com/preview/soilkind?utm_medium=preview_link&utm_source=designer&utm_content=soilkind&preview=b4fbc04a3dc9333d8d254d2355f5da58&pageId=652546b105790fd9348571e7&locale=en&workflow=preview
j
jonas.halbstark
4 days ago
here is an example.
So insid the loop we check if the media is a video or image
K
Kevin
4 days ago
Awesomeeee got it working, thanks so much
K
Kevin
4 days ago
I think this would be good to have in the template though maybe? Since client can upload video in product media, they expect it to work π
j
jonas.halbstark
2 days ago
yes good idea. We will put in the the next version
Add a reply
Sign up and join the conversation on Discord
Join on Discord