Log in Sign up

How to embed images using Markdown?

I have an image saved as _image_name.png in the same folder as the post. I am using the following syntax but my blog doesn't render an image:

![description](/_image_name.png)

How can I fix this?

Also, I noticed that there aren't any names for whoever responds to posts. You may want to put one just for yourself.


3 years ago, 4 replies   Edit question

I figured it out. The forward slash at the beginning is not needed.

Answered 4 years ago · Edit answer

Excellent, glad you figured it out. The first path you used /_image_name.png would only work if the image was located in the top-level directory of your blog folder. Removing the slash makes it a relative path, so it will work if the image is located in the same folder as the post.

There aren't any names for whoever responds to posts by design – all questions and answers are anonymous!

Answered 4 years ago · Edit answer

Thank you, that's good to know!

Answered 4 years ago · Edit answer

Hi David, could you please add this info in this article: https://blot.im/how/format/embedding

I spent so much time figuring out why my image in the same folder as the text post was not showing up until I searched Questions. Would be great for others if it's covered in the main article. Thank you! :)

Also can you please help me with the exact "alt" code that needs to be added to template to render image caption text.

Answered 3 years ago · Edit answer