Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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)
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024