FROM CACHE - jp_header

Clarification on Image Order Preservation in createProductMedia API Response

Clarification on Image Order Preservation in createProductMedia API Response

moriyuu__
Shopify Partner
1 0 0

I have been utilizing the createProductMedia endpoint to upload multiple images for products, and I have a specific question regarding the order of images.

https://shopify.dev/docs/api/admin-graphql/2024-01/mutations/productCreateMedia

 

When I use the createProductMedia endpoint to upload a series of images for a product, is the order in which I upload the images preserved in the API's response? Specifically, if I upload images in a certain sequence, can I expect them to be returned in the same order in the response from Shopify?

 

Understanding whether the order is preserved is crucial for my application, as we rely on the sequence of images for display purposes on our frontend. If the API does not guarantee this order preservation, are there any recommended practices or workarounds to ensure that the images appear in the desired sequence on the storefront?

 

I appreciate any guidance or insights you can provide on this matter. Thank you for your assistance.

0件の返信0