@JordanFinners I retried product update after adding userError logs.
Out of 25 images, 2 did not get linked. Rest 23 were linked.
Got the following error for 2 images during productVariantAppendMedia mutation.
“data”: {
“productVariantAppendMedia”: {
“product”: null,
“userErrors”: [
{
“field”: [
“variantMedia”,
“0”,
“mediaIds”
],
“message”: “Non-ready media cannot be attached to variants.”
}
]
}
},
Ah good, thats progress then.
So it looks like you’ll have to wait for each of the media items to be ready before trying to append them.
You can probably poll the product, until everything is ready before calling append media.
I’m guessing because you are pushing a lot of images over in one go on productSet its taking time to process them behind the scenes.
The other option I would suggest looking at is the staged media uploads, where I don’t think you’d have the same problem Manage media for products
Thankyou so much for helping out. I have added the logic to wait for each of the media items to be ready before trying to append them, using media polling until all the images are ready. This has fixed the issue of missing variant images on the product publishing job.