How can I retrieve an image URL using a unique image ID?

How can I retrieve an image URL using a unique image ID?

sydneyroosters
Shopify Partner
7 0 1

Can I retrieve the image object (I need the image URL) if I have the image ID?

 

Here is some context. 

I get this response from the createFile API call: 

id: 'gid://shopify/MediaImage/30654432182435'

fileStatus: 'UPLOADED'

preview: { image: null }

 

I don't get any image information in the above response. Based on the status, the file is still being uploaded and needs to be in the Ready state to fetch the URL. Once that is done, I would like to retrieve the url but I can't seem to find the right method / approach to do so. 

 

Any help would be appreciated. 

 

Thank you!

 

Replies 0 (0)