1

Just curious here.

According to the help center, you can use this markdown for images:

![sample image](http://example.com/img.jpg)

And if we want, we can also use the "reference" format for images

![sample image][1]

 [1]: http://example.com/img.jpg

So far, so good. However, the editor interface uses another format, which I'm not sure I understand the syntax of.

[![sample image][1]][1]

 [1]: http://example.com/img.jpg

with the extra brackets and the duplicated [1]. How does that work? If I remove the inner [1], I get one visible [ in front of the image.

Like I said, just curious. I can't find this format documented anywhere. And I don't understand why there are so many different ways to insert images. Do some of those formats have features the others don't have?

1

The first and second options you mention are equivalent. They both insert an image by providing the URL to that image.

The third option also adds a link: it combines the link markdown [link text][ref] with the image markdown ![alt text][ref] to form [![alt text][image ref]][link].

Using this, you get a linked image, which is useful because it lets you see the larger version if one is available (the display may downsize a large image).

  • Ah... Of course I knew that images here are usually links to their full versions. And now you mention it, it's so clear that this syntax is simply an image nested in a link. Thanks for rubbing my nose in it! – Mr Lister Jan 12 '16 at 10:52

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