All things Shopify and commerce
We have tried to post the image URL in Shopify product image API but I am getting the below error from Shopify :-->
Request data to Shopify product image API
{
"image": {
"variant_ids":[
41012428079269
],
"src": "https://tagrainstorage.blob.core.windows.net/testtagimages/47babd4a-8281-4a53-bd93-d97f37a0fcfa.jpg"
}
}
Error Response from Shopify product image API :--
{
"errors": {
"image": [
"Could not download image: [\"/testtagimages/47babd4a-8281-4a53-bd93-d97f37a0fcfa.jpg is not a valid image file type.\"]"
]
}
}
However, When I try to attach some other image URL, I get a successful response:--
Request to Shopify product image API:--
{
"image": {
"variant_ids":[
41012428079269
],
"src": "https://image.freepik.com/free-vector/mobile-phone-chat-template_23-2147511106.jpg"
}
}
Response from shopify product image API :--
{
"image": {
"id": 31722670162085,
"product_id": 7117939081381,
"position": 1,
"created_at": "2021-10-20T08:02:55Z",
"updated_at": "2021-10-20T08:02:55Z",
"alt": null,
"width": 626,
"height": 626,
"src": "https://cdn.shopify.com/s/files/1/0577/9406/8645/products/mobile-phone-chat-template_23-2147511106.j...,
"variant_ids": [
41012428079269
],
"admin_graphql_api_id": "gid://shopify/ProductImage/31722670162085"
}
}
Please let me know why we are getting the error with the first image API POST but not with the second image url?
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024