Help! Upload images using REST Admin API

Help! Upload images using REST Admin API

TritonJK
Shopify Partner
16 0 2

Am I able to upload images to a shopify store using the REST admin API at all?

is the src in the put asset api for files already existing on the store? Or am I able to include an external URL in this field to upload an image as an asset?

Replies 2 (2)

TritonJK
Shopify Partner
16 0 2

I am wanting to create a system for moving a theme from one shopify store to another. With this, I want to be able to have the image in the image banner on my theme to transfer from one shopify store to the next.

Liam
Shopify Staff
2873 312 821

Hi TritonJK - you will need to specify an external URL in the src field to upload an image as an asset, but it will need to be publicly accessible, so a link to themes asset file may not work. You may need to have a publicly accessible URL. 

Liam | 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