memecub

How do I add an image to a Markdown file?

Write ![alt text](image-url) 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.

The basic syntax

An image in Markdown is an exclamation mark, square brackets for the alt text, and parentheses for the URL: ![alt text](image-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: ![screenshot of the settings page](settings.png).

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: ![diagram](assets/diagram.png). 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 ![alt text](image-url).

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.