9

Whenever you use the button above the edit text area on SO for inserting an image in a post it adds this (as well as a stack.imgur link below)

[![enter image description here][1]][1]

Why does it insert it like that instead of:

![enter image description here][1]

The extra brackets and [1] are kind of pointless, no? Looks odd and there doesn't seem to be anyone else commenting on it on here.

Also, I see so many posts that completely ignore the "enter image description here" (found this related post) and plenty of others that somehow manage to upload an image without using the exclamation mark ! to make the image appear inline. Why does this happen so often if it defaults to showing the image inline? (e.g. this post originally did not use the exclamation mark even though it should have — presumably the poster deleted it… but why? Maybe they were confused by the excess brackets in the insertion above?)

Also, many posters don't seem to be aware that you can easily adjust the size of the image by appending an "l" or "m" etc to the end of the image link (before the path extension). Maybe if there was a note about it in the side menu if it detects someone has inserted an image — although seems unlikely people would notice that.

4
  • Related: Why does the images index on stackoverflow appear twice?
    – honk
    Commented Jun 6, 2018 at 6:36
  • 1
    Oh… -1 for Stack Overflow's search bar
    – shim
    Commented Jun 6, 2018 at 14:37
  • BTW: If you are editing to make the displayed image be a lower resolution one (e.g. by adding l or m to the URL), then please leave the actual clickable link as a link to the full resolution version rather than the lower resolution one. This requires creating an additional URL, not just changing the current URL. For example, [![enter image description here][1]][1] becomes [![enter image description here][1]][2], with the 2: URL being the original, full resolution.
    – Makyen Mod
    Commented Jun 7, 2018 at 2:16
  • Yea somebody mentioned that in the comments on the answer below.
    – shim
    Commented Jun 7, 2018 at 4:31

1 Answer 1

34

[![enter image description here][1]][1] makes the image a link to itself. This makes it easy to simply click on it to open the image itself (useful for large images that appear small in the post). I don't see any reason at all to prefer ![enter image description here][1] over it - what benefit is there from losing this convenience?

As for posts without the !, it might be new user restrictions in action. When a new user uploads an image, only the link is added to the post, without inlining it.

8
  • 1
    Oh, had no idea but that makes a lot of sense and I wish I had realized it myself. (Looks weird though.) Also, wish I knew that earlier since I have removed it in more than a few posts. 😒New users are not allowed to post inline images?
    – shim
    Commented Jun 6, 2018 at 1:18
  • 9
    It also makes it really easy to change the size of the image in the post since you can change the second 1 to a 2 and add a second line for the link that goes to the full size while using the size limiters on the 1 URL.
    – Catija
    Commented Jun 6, 2018 at 1:21
  • 4
    Where does one go to learn such useful pro tips for SO?
    – shim
    Commented Jun 6, 2018 at 1:27
  • 1
    @shim For the large majority SO/SE handles it for them automatically. You have to manually break the behavior for it not to work. And for those who need/want to know it, they can look up Markdown documentation (the "formatting help" link on the right when you write a post). Commented Jun 6, 2018 at 8:58
  • 3
    @shim also see this for more info How to reduce image size on Stack Overflow Commented Jun 6, 2018 at 9:33
  • 2
    Images can only be embedded by users with 10+ reputation. Shameless promotion: Since images are often abused for posting code please consider voting on my feature request and the answers there to help discourage this practice more thoroughly. Commented Jun 6, 2018 at 9:36
  • 4
    @shim Why, prior to determining what the reason is for something being done a certain way, would you remove something that you haven't seen causing harm and you don't know the reason for, particularly when that's the way that it's done automatically by the site? Sure, there are things that are arbitrary, but that's usually the exception rather than the rule.
    – Makyen Mod
    Commented Jun 7, 2018 at 2:11
  • It would be far more helpful if these images linked to a modal popup which contained the larger version of the image instead of navigating away from the question (which is highly discouraged in most cases) Commented Jun 7, 2018 at 9:42

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