Tried to add an image to an answer of mine, but the image doesn't show in preview and it doesn't show after the question is saved either.

Instead of the image, the un-interpreted markdown for the image is shown [![enter image description here][1]][1] appears in both during preview time and after publishing.

I had to delete the line.

What is it happening here. the picture's address markdown continues inside the source and is this one: [1]: https://i.stack.imgur.com/o3JGL.png

If you copy and paste the URL into a browser tab, you can see the image without problems.

enter image description here

  • It works for me. What is special in the markdown surrounding that image markdown? Are you inside code markup? Any other open but not closed html tag? – rene Aug 17 '20 at 10:35
  • @rene Nothing. I tried to insert the image after a paragraph and before the beginning of a block of code ~~~ leaving black lines before and after. – Tulains Córdova Aug 17 '20 at 10:37
  • @rene Some days ago I inserted an image in one of my answers with no problem. – Tulains Córdova Aug 17 '20 at 10:38
  • I tried it in the sandbox and it shows for me: meta.stackexchange.com/a/327693/158100 – rene Aug 17 '20 at 10:39
  • I'd check first for userscripts that might cause such weird problems. Disable all userscripts and try again. This includes also things like adblockers, and anything in the browser that can mess with JS/HTML on the pages. – Shadow Wizard is Vaccinating Aug 17 '20 at 10:40
  • @rene Using HTML IMG tag worked! In this question I added a screen capture of how the image is not rendered in the preview and the markdown is visible in the preview instead. Curious enough I added the screen capture in this meta question using markdown with no problem. – Tulains Córdova Aug 17 '20 at 10:47
  • 1
    I can only reproduce this if there is a codeblock that starts with a code-fench but isn't closed as such. – rene Aug 17 '20 at 10:52

In your revision here you've started a code block with a code fence.

But you never closed it. Therefore the needed markdown reference for the image becomes part of the code block. If a reference isn't found, the link or image isn't rendered.


If you definitely don't want to close your code block with a code fence, move the reference before the start of your code fence like I've shown here.

Or move the URL directly to the image:


Here is the code block with the starting code fence, but no ending one ...

public class CSharpRulez {

  [1]: https://i.stack.imgur.com/o3JGL.png

In this revision of your answer the linking part of your image ( [1]: ) ended up in the code block making the editor unable to render your image as it didn't interpret the hyperlink as such. Make sure to properly indent your code and to close code fences at the end.

You must log in to answer this question.

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