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.

Images added to theme assets via REST API disappear randomly

Images added to theme assets via REST API disappear randomly

DanAtBonify
Shopify Partner
59 4 44

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)

SBD_
Shopify Staff
1831 273 423

Hey @DanAtBonify

 

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

Scott | Developer Advocate @ Shopify