Background:
While trying to insert an image "from the web" into a post, I got the following error message:
After trying and failing a couple of times (and even trying different images), it finally occurred to me that the image was fine, but the original host blocked imgur from accessing it.
I downloaded the image to my computer and uploaded it from there. The result was delicious:
Feature request:
The current error message can be utterly misleading.
If imgur makes it somehow possible to distinguish why an upload "from the web" failed, provide a different error message when the upload clearly failed due to reasons unrelated to the image format.
For example, HTTP status codes
4xx
or5xx
and the presence of certain HTTP headers such asContent-Encoding: text/*
(assuming that imgur makes this information available) indicate either a bad URL or some sort of blocking.If the latter is not possible, change the error message to something more generic. For example:
Failed to upload image; either the format is not supported or the image could not be retrieved. Check the URL or try downloading the image to your computer and uploading it from there.
Related:
The feature request There should be a more descriptive error on image uploading failures is already status-completed, but it refers only to uploading images "from my computer".
wget
. The response was a blank page with aHTTP 401 Unauthorized header
. (Spoofing the user agent did the trick.) For testing purposes: redtwitz.com/401/unauthorized.png