Images added to theme assets via REST API disappear randomly

Shopify Partner
57 4 38

We've seen an issue come up randomly that we're having a really hard time explaining.


Our app can add images to a theme via the REST API. The file contents are base64 encoded, and a PUT request adds them to the theme. We get a response back with the "public_url". The image is in the theme and appears to work fine.


However, after some period of time (unknown), the image can randomly disappear (completely removed from the theme). This doesn't happen all the time. If someone uploads a hundred images the issue may happen to one or two of them.


We have been unable to pinpoint any particular cause of the issue. It does not correlate to specific file types, file names, or file sizes. The issue is hard to catch as well, since the files get cached by Shopify's CDN and continue to get served after the actual theme asset has been deleted.


Curious if anyone else has ever seen this before or has any ideas.

Reply 1 (1)

Shopify Staff
1829 270 412

Hey @DanAtBonify


Next time you see this can you please DM me with details (store, image url, theme id, etc)?

Scott | Developer Advocate @ Shopify