6

When I try to embed an image, a convenient way to do so is via the "landscape icon" in the edit UI. For at least some Wikipedia images, for example this one, I consistently get an error that looks like this:

Error message when trying to upload Wikipedia images to Imgur

Is this by design? If so, why?

After realizing that the original link I used was not an image, I tried to embed the actual image manually, using the Markdown content created by successful uploads, and it works:

Direct link works

This probably indicates that it is an Imgur issue.

Note that the image page on Wikipedia that opens when one clicks on an image in a Wikipedia article may not be an actual image; this was the URL that I used in the first attempt, which is not "embeddable" at all: https://en.wikipedia.org/wiki/Silicon_nitride#/media/File:Si3N4bearings.jpg. Despite the ".jpg" suffix the URL points to a relatively complex HTML web page, as an astute observer — like Glorfindel ;-) — would realize by the footer and navigation arrows.

2

2 Answers 2

14

Yes, this is by design. You might think the extension of https://en.wikipedia.org/wiki/Silicon_nitride#/media/File:Si3N4bearings.jpg is .jpg, so it's a JPEG image, but it is not. The part after # is the URL fragment; the page is just https://en.wikipedia.org/wiki/Silicon_nitride and /media/File:Si3N4bearings.jpg is an anchor (bookmark) on that page which just happens to end in .jpg. So in reality it is an HTML page (which you could also infer from the fact that you see more than just an image on the page itself). I assume one of the reasons Wikipedia shows the page like this is to encourage you to provide attribution.

If you right click the menu and choose 'Copy image link' (or the equivalent in your browser), you'll get the real URL to the image: https://upload.wikimedia.org/wikipedia/commons/6/64/Si3N4bearings.jpg which you should be able use in the image uploader (except that testing below clearly shows otherwise ... no idea what happens. Maybe some HTTP headers / redirection magic?). If you open the link, you will also see the browser just shows an image, without decoration. Even if you cannot upload it, you can still embed it directly: ![](https://upload.wikimedia.org/wikipedia/commons/6/64/Si3N4bearings.jpg) produces

Some testing on https://i.imgur.com shows the problem lies on imgur's end, not Stack Exchange.

6
  • 1
    I tried uploading that file URL directly, that also failed for me.
    – Luuklag
    Jan 25 at 8:29
  • Oh. Feeling a bit ... dumb. Let me try. Jan 25 at 8:30
  • Hm. Feeling a bit less dumb, the actual image link fails for "me too". Jan 25 at 8:31
  • You're right. I was 100% that used to work, but apparently it doesn't (anymore?)
    – Glorfindel Mod
    Jan 25 at 8:34
  • 2
    I filed a bugreport / ticket referencing this post with Imgur.
    – Luuklag
    Jan 25 at 9:43
  • I usually go to the Details page, which often has several different resolutions of the image. Eg commons.m.wikimedia.org/wiki/… But they don't seem to work anymore...
    – PM 2Ring
    Jan 25 at 16:30
3

I just downloaded the image, and then uploaded it again. This appears to work. So it must have to do something with the filepath created by Wikipedia, or that there is some restriction on reuploading those images.

Enter image description here

2
  • Yeah, well, I don't think the reason is in the image bits, because it's not the only one failing. Jan 25 at 8:32
  • 2
    No the image itself is actually fine, which I showed by downloading and uploading it here. There must be either something off with the filepath that wikipedia created, or some sort of restriction in the uploader to limit images from wikipedia.
    – Luuklag
    Jan 25 at 8:36

You must log in to answer this question.

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