How do I add an image to a Markdown file?
Write  where you want the image to appear. The alt text describes the picture for screen readers and broken links, and the URL can be a web address or a path to a local file like images/photo.png. For GitHub, drag the file into the comment box to get a hosted link, then paste it into the same syntax.
Send when a tool refuses to render your Markdown and you just want the image to show up.
The moment you forget the bracket order and go back to searching for the syntax.
For the reply that corrects your parentheses versus brackets in the image syntax.
A nudge of encouragement when a broken image link ruins your README.
When a stray bracket turns your carefully written alt text into plain text.
For docs that say the image example is left as an exercise to the reader.
The basic syntax
An image in Markdown is an exclamation mark, square brackets for the alt text, and parentheses for the URL: . The exclamation mark is what separates an image from a normal link.
Alt text is not decoration. It is read by screen readers and shown when the image fails to load, so write what the picture shows: .
The URL can be absolute (https://example.com/cat.png) or relative to the Markdown file (images/cat.png). Relative paths are what you want for local images in a repo.
Local images, GitHub and VS Code
For a local image, keep the file next to your Markdown or in a subfolder and reference it by path: . The path is case-sensitive on GitHub and most servers.
On GitHub, open the issue or comment box and drag the image in, or paste it from the clipboard. GitHub uploads it and inserts a link you can copy into your Markdown file.
In VS Code, drag a file from the explorer into the editor and it inserts the image syntax for you. The Markdown preview (Ctrl+Shift+V) shows whether the path resolves.
Size, captions and things Markdown does not do
Plain Markdown has no size syntax. To control width, use HTML: <img src="cat.png" alt="cat" width="300">. Many renderers also accept an attribute list after the image, but support varies.
There is no standard caption syntax either. The common workaround is an italic line under the image, or a figure element in HTML.
If you need a picture for a chat or a doc and nothing in your folder fits, memecub's AI meme maker can generate one from a description, and the AI meme placement tool can pick a fitting meme for each paragraph of an article.
Nothing quite right? Make one
Pick a character, type a caption, get it in about 10 seconds — free to try.
More that fit
FAQ
Can you put emojis in Markdown?
Yes. Paste the emoji directly, or use a shortcode like :smile: on platforms such as GitHub that support it.
What is ``` in Markdown?
Three backticks open and close a fenced code block. Text inside is shown as code, not formatted.
How can I convert a photo to Markdown?
You do not convert the photo itself. Upload or host the image, then reference its URL with .
What does ### do in Markdown?
It makes a level-three heading. More hashes mean a deeper heading level, up to six.
Why is my Markdown image not showing?
Usually the path is wrong or the file name case does not match. Check the relative path from the Markdown file and confirm the image was committed.