Unable to upload certain image URLs to product

Hi - i’m trying to upload image by URL (via python script) but it’s not working and gives a 500 error.

The problem also exists if I try to upload via shopify product page (click Add from URL). Can try with below url and see.

I need this fixed so that scripting can create products seamlessly and not fail due to shopify not being able to ingest this image. Any ideas why it cannot ingest this image?

https://www.synnex.com.au/globalassets/catalogs/root/productimages/wb-razer/eb/rz09-0427nea3-r3b1/medium/razer_blade_14_001.png

Thanks,

Sean

This image is loading hilariously slow, so Shopify is probably timing out. I haven’t seen images load like this in 20 years ‌ :joy:

It’s a 10.7 megabyte file that took me 16.31 seconds to fully load. At the time of this writing a speed test shows my download rate as being 550mbps so my quick math tells me I should be downloading that image in about 0.155 seconds. Maybe your host isn’t using a CDN or something? You’ll want to start by finding a better host for those images, maybe look into something like Imgur which has the infrastructure to load quickly from nearly anywhere in the world. Give it a try with just one image to start and see if there’s any improvement.

hmm interesting. It took me just under 4 seconds to download the image from my machine (my internet is 50mbps down)

Even in your case, it eventually succeeds fully loading. Not sure why Shopify is unable to ingest this image when provided this URL.

Like I said, it’s probably timing out. Image downloads are supposed to take milliseconds so they’ve probably configured it to skip on downloads that take more than like half a second. Download the image to your computer and then upload it directly and see the difference. Assuming your upload speed is higher than 5 or so :wink:

Good ideas - i’ve tried that. I even limited my upload speed to 2mbps (which resulted in a succesful 48s upload time).

Are you sure there is a timeout or is it an assumption? is it written somewhere in documentation? because i cannot find it

Shopify doesn’t document every last limitation since it carries a lot of negative connotation. Rather they will say that your computer needs to be in good working order and that you need sufficient internet speeds or there could be undesired behaviour and leave it at that. There are many many quiet timeouts that are meant to improve the overall performance, around the time most people would get bored and/or assume something is going wrong anyway.

Think like a developer - do you let people upload 1 gigabyte image files on a 5mbps upload speed and let the experience be horrible? Or time it out after a second or two because it’s nearly 2023 and it shouldn’t ever take longer than that?

but it succeeded with a 48s upload time on a 2mbps connection?? so i can’t imagine the timeout being an issue for the original issue, right?

Thinking like developer, its worse to have it fail uploading an image than it is to have a slower upload (which happens in the background anyways!)

Failure is the worst outcome.

All I know is that I may have worked on the technical side of a company that likes green shopping bags which shall go nameless. I therefore know two things without question: they have a lot of timeouts in place to keep the workflow moving and that even 4 seconds is too long to download an image from a URL, let alone 16 or 48. Find a better image host.

it uploaded to shopify succesfully in 48s with a simulated super slow upload speed of 2mbps… your assumption of my image timing out is what i’m questioning here

Now try uploading the same image to Imgur and upload via URL that way.

That way we can demonstrate that Shopify’s system for uploading images is fine using either method, and that the only common denominator here is your image host that seems to be uploading from the year 1994.

Or you can contact Shopify support! But I do have a sneaking suspicion that it’ll take you down the same troubleshooting path to the same conclusion.