Cannot load images from Drive via API

I suspect something changed in the API

I am trying to upload variant images, but when I supply the src as drive direct link it fails

{
"errors": {
"image": [
"Could not download image: [\"Image https://drive.google.com/uc?export=download&id=[0B9o1MNFt5ld1N3k1cm9tVnZxQjg](https://drive.google.com/uc?export=download&id=0B9o1MNFt5ld1N3k1cm9tVnZxQjg) failed to download. - file not found. Check that file can be found at your URL.\"]"
]
}
}

The curl command is

curl -X POST \
[https://example.myshopify.com/admin/api/2021-10/products/736972003xxxx/images.json](https://example.myshopify.com/admin/api/2021-10/products/736972003xxxx/images.json) \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-H 'x-shopify-access-token: <<token>>' \
-d '{
"image": {
"position": 1,
"src": "[https://drive.google.com/uc?export=download&id=0B9o1MNFt5ld1N3k1cm9tVnZxQjg](https://drive.google.com/uc?export=download&id=0B9o1MNFt5ld1N3k1cm9tVnZxQjg)"
}
}' 
2 Likes

** Following **

Currently experiencing the same issue

1 Like

Hi @Ancita

Can you please try it without the export=download parameter? I am not sure our system is expecting the file to be sent in that way. Please let me know if you’re still experiencing the issue with that parameter removed from the URL.

Regards,

Hi

I have the same problem as Ancita. Unfortunately, your proposed solution does not work for me either (although it used to work).

Regards

1 Like

Unfortunately export=download doesn’t work. I wonder why it was working past 5 days? Something changed and now the API doesn’t work.

3 Likes

Here is the solution to your problem

https://apps.shopify.com/compress-files?