What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How to change the previewImage of the Video ?

Solved

How to change the previewImage of the Video ?

yinghechen
Shopify Partner
9 0 0
After I created a video through api, and I have the video ID, but I couldn't find a mutation that allows me to update the previewImage of the video. Or is there a way to set it during productCreateMedia or stagedUploadsCreate The documentation of video is at : https://shopify.dev/docs/api/storefront/2023-07/objects/Video
Accepted Solution (1)

Shayne
Shopify Staff (Retired)
254 20 48

This is an accepted solution.

You should be able to update the preview image of the media with the productUpdateMedia mutation, `UpdateMediaInput.previewImageSource` is likely what you're looking for.

Shayne | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Reply 1 (1)

Shayne
Shopify Staff (Retired)
254 20 48

This is an accepted solution.

You should be able to update the preview image of the media with the productUpdateMedia mutation, `UpdateMediaInput.previewImageSource` is likely what you're looking for.

Shayne | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog