Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Description:
Trying to update image on a line item via cart transform api.
What Image:
Image that exists and works on shopify cdn.
Access Scopes:
write_cart_transofrms,write_products
Output Json
{
"operations": [
{
"update": {
"cartLineId": "gid://shopify/CartLine/e63a162c-40b0-47a2-b29a-7d3f5dbcc07f",
"title": "This was updated ",
"image": {
"url": "https://cdn.shopify.com/s/files/1/0809/9315/7416/files/media_187dda34-9d36-454b-ad75-995ec87eab48.png"
}
}
}
]
}
Error Message
[
"operations[0] (update): [{code: image_not_found, message: Image not found for the shop.}]"
]
Solved! Go to the solution
This is an accepted solution.
Could this be a reason?
https://shopify.dev/docs/api/functions/reference/cart-transform#showing-overrides :
Images that are used for override must first be uploaded to the Shopify CDN and should belong to the store.
This is an accepted solution.
Could this be a reason?
https://shopify.dev/docs/api/functions/reference/cart-transform#showing-overrides :
Images that are used for override must first be uploaded to the Shopify CDN and should belong to the store.
Hello Tim
Thank you for helping, I figured out the issue. Image should be uploaded as Media not as file. I was trying initially with type as File. After changing. it to media, it all worked. (even though the file upload is shopify cdn, it fails, you cannot use it part of cart transform api)