How do I add a meme to a Markdown file in VS Code?
Save the meme image next to your Markdown file (for example in an images folder), then insert it with the syntax . Use a relative path, not a full web URL, if the file lives in your project. Press Ctrl+Shift+V (Cmd+Shift+V on Mac) to open the preview and check it renders.
An ASCII cat built from text characters — the one meme that needs no image file at all, just paste it in a code block.
Send when your Markdown file is full of copy-pasted image links and you finally admit the pattern.
The moment the preview shows a broken image icon because the path is wrong.
For when a tool forces rich text on you and all you want is plain Markdown.
Pairs with a README commit that only bumps the VS Code version note.
When the image path question sends you back to search results for the third time.
The syntax and where the file goes
Markdown images use . The alt text is what screen readers and broken-image placeholders show, so write something short and real, like ![shocked face].
Put the image inside your project, for example a folder named images next to the .md file, and reference it relatively: . Relative paths keep working when the repo is cloned or the folder is moved.
A full URL also works: . Use this only for images that are already hosted somewhere stable.
Pasting and previewing in VS Code
VS Code does not turn a pasted screenshot into a file by itself. Save the image first (right-click, Save image as, or your screenshot tool), then type the link.
Some setups add a paste-image extension that saves the file and inserts the link for you. If you install one, check where it writes the files so the paths stay relative.
Open the preview with Ctrl+Shift+V, or the side-by-side preview with Ctrl+K V. Click a link in the preview to jump to the file, which is a quick way to confirm the path is right.
Size, captions and GitHub
Plain Markdown has no size syntax. In VS Code preview and on GitHub you can use an HTML tag: <img src="images/meme.png" alt="shocked face" width="300">. Keep the alt attribute either way.
Markdown has no caption element. Put the caption on the line under the image in italics, or wrap the image and caption in a small HTML figure if the renderer supports it.
On GitHub, images committed to the repo render from relative paths. Drag-and-drop into a GitHub comment uploads the file and inserts a URL, but that URL belongs to the comment, not your repo.
Finding a meme to embed
Search memecub.com for the reaction you want, download the image, and drop it into your images folder. Browsing and downloading need no account.
Most memes there are collected from the web: fine for personal notes and chats, with copyright staying with the original creators. If the Markdown file is a public README or docs page, turn on the openly licensed filter so the image is safe to use commercially.
If nothing fits, the AI meme maker at memecub.com/generate takes a character, action and caption and returns an image in about ten seconds.
Nothing quite right? Make one
Pick a character, type a caption, get it in about 10 seconds — free to try.
More that fit
FAQ
How do I insert an image in the Markdown preview in VS Code?
You do not insert it in the preview — the preview is read-only. Add the  line in the .md file and the preview updates as you type.
Can I set the image size in Markdown?
Not with standard Markdown syntax. Use an HTML img tag with a width attribute, which works in VS Code preview and on GitHub.
How do I add an image to a Markdown file on GitHub?
Commit the image to the repo and reference it with a relative path, or drag the file into a GitHub comment to get an uploaded URL. Relative paths are better for README files.
Can you put emojis in Markdown?
Yes. Paste the emoji directly, or use a shortcode like :smile: where the renderer supports it, such as GitHub.
What does ### do in Markdown?
It marks a level-three heading. One # is the top heading, and each extra # goes one level deeper.