Preprocessing product images

Preprocessing product images

alextech1
Shopify Partner
1 0 0

Hello all,

 

my goal is to implement a preprocessing step for product image upload. When admin selects an image it should be sent to an external API. The processed image should be uploaded to Shopify.

 

My initial approach was to implement an Extension but it seems that there is no component for image upload (https://shopify.dev/docs/api/admin-extensions/components).

 

What would be the correct approach here?

Reply 1 (1)

Liam
Shopify Staff
2823 310 805

Hi Alextech1,

 

One approach you could explore would be to use the Admin API to create endpoints for image upload and then create an interface in your app for admins to upload images. On image selection, you would send the image to your external API for processing and once the image is processed, use the Admin API's MediaImage or Asset resource to upload the processed image to the relevant product in Shopify.

 

Hope this helps!

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