Skip to content
All referenceLinks & Media

Markdown Image

Learn how to add images in markdown with alt text, titles, and links. Syntax, sizing workarounds, and platform support.

What is markdown image?

Images in markdown use the same syntax as links but with an exclamation mark prefix: ![alt text](url). The alt text describes the image for screen readers and when the image fails to load.

Syntax

Basic image

Exclamation mark + brackets for alt text + parentheses for the image URL.

Result
A sunset over the ocean

Image with title

Add a title in quotes for a tooltip on hover.

Result
Logo

Linked image

Wrap an image in link syntax to make it clickable.

Result
Alt

Platform support

PlatformSupportedNotes
GitHubYesDrag-and-drop upload in issues/PRs
GitLabYes
DiscordNoPaste/upload images directly instead
SlackNoUpload images directly
RedditPartialImage posts, not inline markdown images
Stack OverflowYesUpload via editor
NotionYesPaste or /image command
ObsidianYesAlso supports ![[wikilink]] images

Common mistakes

Wrong
[image](url.png)
Right
![image](url.png)

Missing the exclamation mark (!) creates a link, not an image. The ! tells markdown to embed the image.

Wrong
![](url.png)
Right
![Description of image](url.png)

Empty alt text hurts accessibility. Always describe the image for screen readers.

Wrong
![alt](relative/path.png)
Right
![alt](./relative/path.png)

Relative paths can break depending on the renderer. Prefer ./ prefix or absolute URLs for reliability.

Tips for image

1Always write alt text

Alt text is essential for accessibility. Describe what the image shows in a few words — screen readers depend on it.

2Resize with HTML

Markdown has no native image sizing. Use HTML for control: <img src="url" width="300" alt="text" />.

<img src="photo.jpg" width="400" alt="A photo" />
3Use relative paths in repos

In GitHub repos, use relative paths like ./images/photo.png so images work across branches and forks.

Frequently asked questions

Everything you need to know.

1

How do I add an image in markdown?

Use ![alt text](image-url) syntax. The exclamation mark distinguishes images from links. Example: ![My photo](https://example.com/photo.jpg).

Related elements

Try it in the editor

Paste your markdown and see image rendered instantly with professional themes.