How to add an image in a Markdown file
NicolasBrondinBernard
Want to display an image in a .md file? Here's the solution!

Article published on 06/03/2023, last updated on 10/08/2026
Images in documentation files are truly underused resources, whether it's to illustrate the project, add diagrams, mockups, etc... it's a very effective way to convey information!
Only one line of code is needed, but since the syntax isn't necessarily easy to remember, here's how to add an image in Markdown:

Note that the image file's URL is relative to the location of the Markdown file!
A few additional pieces of information:
- The alternative text appears if the image cannot be displayed
- The title appears when hovering with the mouse
No spam. Only free content, news, and ever more resources to level up your skills!
Join +1500 developers
No comments yet