Product Media API: Upload without linking & deletion

Shopify Partner
12 0 1


I recently ran into and have two questions.


1) The upload is a three step process, where I will (1) request to upload a file, (2) upload the file to S3 and (3) link the file to a product.

1.1 What happens if the uploaded media is never linked to a product? Is that okay?

1.2 Will it be deleted after a while?


2) The operation described in "Deleting media objects" will actually delete the media file on S3. After that operation the file is not anymore available on S3.

2.1 Do I understand that correctly?

2.2 What happens with the linked product, will it point to a 404 location?




Shopify Staff
Shopify Staff
272 35 46

Hey @Markus_Arndt 

I'm not aware of any specific rules for deleting unlinked or stale media. Regarding the delete mutation, this will remove the association of the media with the product, but doesn't affect what is uploaded to S3. For example, if you were to upload an image and then associate it with a product, you could then remove that association using the deleteProductMedia mutation, and then associate it with a different product. 

Kevin_A | Developer Support @ 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 or the Shopify Web Design and Development Blog