How can I use the admin API to upload local images to products

Shopify Partner
4 0 0

We have a requirement to use local images on the product. Due to the high demand, we would like to upload product images using the rest amdin API, but I don't know how to generate "attachment" data.



Reply 1 (1)

Shopify Staff
1829 270 410

Hey @luoooofei 


Attachment is a Base64 version of the image.

Scott | Developer Advocate @ Shopify