What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 133 Stack Exchange communities.

Background:

While trying to insert an image "from the web" into a post, I got the following error message:

Failed to upload image; the format is not supported

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:

Mmm... waffles!

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 or 5xx and the presence of certain HTTP headers such as Content-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 , but it refers only to uploading images "from my computer".

share|improve this question
    
Ooh. So that's what that was. –  lunboks Apr 28 '12 at 20:04
    
I'm fairly sure that the format is not supported is the reason Imgur sent back. If the web server is blocking the request, it may be sending an incorrect response code and having Imgur download an HTML file or something, which is not supported. (The image URL in the picture doesn't work for me.) –  animuson Apr 28 '12 at 20:07
    
@animuson: I don't remember the URL, but I found out because I tried to download the image using wget. The response was a blank page with a HTTP 401 Unauthorized header. (Spoofing the user agent did the trick.) For testing purposes: redtwitz.com/401/unauthorized.png –  Dennis Apr 28 '12 at 20:24

1 Answer 1

up vote 2 down vote accepted

I have added some more checks for image uploads with descriptive messages.

Unfortunately, when it comes to passing a URL to imgur, we can only display what they tell us (which ends up being a 400 error).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .