hey!
I am using the query to create an image
productCreateMedia(productId: $productId, media: $media) {
media {
alt
mediaContentType
status
preview {
image {
id
}
}
}
product {
id
}
}
This creates the image and returns the following
{"media"=>[{"__typename"=>"MediaImage", "alt"=>"", "mediaContentType"=>"IMAGE", "preview"=>{"image"=>nil}, "status"=>"UPLOADED", "mediaErrors"=>[]}], "product"=>{"id"=>"gid://shopify/Product/5311831539871"}, "mediaUserErrors"=>[]}
Is there someway I can access the newly created image id? the id is actually available under preview but it is returning nil currently for some reason..
wondering how to fix this.
thanks
Arjun
I think this is happening because the image is uploaded but not processed yet.
FAILED | Preview image processing has failed. |
PROCESSING | Preview image is being processed. |
READY | Preview image is ready to be displayed. |
UPLOADED | Preview image is uploaded but not yet processed. |
I am getting back the status as uploaded, but without the image id.
just wondering how I could wait for this to be processed so that I can retrieve the image id also with this request.
User | Count |
---|---|
12 | |
12 | |
7 | |
6 | |
5 |