First time here? Check out the FAQ!

How to insert images into a numbered list with markdown?

If there is an image between numbered list items, then you get wrong numbers. Example:

  1. Number One

image description

  1. Number Two (but you see 1.)

image description

  1. Number Three (but you see 1.)

image description

Toms's avatar
asked 2012-11-16 05:06:50 -0500
Evgeny's avatar
updated 2012-11-17 10:26:04 -0500
edit flag offensive 0 remove flag close merge delete


Removed tag "bug" as the described behavior is by design of the markdown library.

Evgeny's avatar Evgeny (2012-11-16 17:11:56 -0500) edit
add a comment see more comments

1 Answer


This is actually correct behavior.

  1. First item.

Unindented content breaks up the list.

  1. Second item.

To make this work, you need to indent your images to make them part of the list:

  1. First item.

    Indented content appears as part of the previous list item.

  2. Second item.

todofixthis's avatar
answered 2012-11-16 09:19:48 -0500, updated 2012-11-17 09:56:53 -0500
edit flag offensive 0 remove flag delete link


but if you want to make the counts your self, you can not! I can not write in the text: 4. This ist forth something, scince I get 1. This ist forth something . For me this is not correct

Toms's avatar Toms (2012-11-16 10:10:03 -0500) edit

This is how markdown works. You can try using the wysiwig editor (tinymce). Neither one we can change significantly as they both depend on third-party libraries.

Evgeny's avatar Evgeny (2012-11-16 12:38:57 -0500) edit

@todofixthis Could you make an example with images? thank you

Toms's avatar Toms (2012-11-17 05:41:29 -0500) edit

Updated answer with lolcats (:

todofixthis's avatar todofixthis (2012-11-17 09:57:18 -0500) edit

@todofixthis Thank you! I see it works, but it is too complicated for new users and it shifts the pictures to the right and makes them smaller, which is not so good for images with text.

Toms's avatar Toms (2012-11-17 13:08:28 -0500) edit
add a comment see more comments