memecub

How do I resize an image in Markdown?

Standard Markdown has no way to set image size: ![alt](url) always renders at the image's natural size. To resize, either drop in an HTML tag like <img src="pic.png" alt="alt text" width="300">, or use a renderer-specific option such as an attribute list ({width=300}) in Pandoc, a size suffix in Obsidian, or a width parameter in GitHub's HTML output. If your platform strips HTML, resize the file itself before uploading.

The three ways to set image size

HTML tag (works almost everywhere that allows inline HTML): <img src="cat.png" alt="A cat" width="300">. Add height="200" only if you want to force both dimensions; setting one keeps the aspect ratio.

Attribute list (Pandoc, some static site generators): ![alt text](cat.png){width=300px height=200px}.

Renderer-specific syntax: Obsidian uses ![[cat.png|300]], some wiki and CMS tools accept ![alt](cat.png =300x200). Check your platform's docs before relying on it.

When resizing does not work

GitHub READMEs render HTML img tags, so width and height attributes work there; plain Markdown size syntax does not.

If HTML is stripped (many comment boxes, some chat apps), resize the image file first and upload the smaller version.

For a caption, put the image on its own line and add an italic line under it, or wrap it in <figure> and <figcaption> where HTML is allowed.

For a local file, use a relative path like ![alt](images/cat.png); in VS Code the preview resolves it from the Markdown file's folder.

Picking the right image

A resized image still needs to fit the tone of the post. If you need a reaction image for a README, a blog post or a chat, memecub.com has a searchable meme library you can browse and download without signing up.

Most memes there are collected from the web: fine for personal chats, with copyright staying with the original creators. If the image will be used commercially, turn on the openly licensed filter.

If nothing in the library 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 change the size of an image in Markdown?

Plain Markdown cannot do it. Use an HTML img tag with width or height, an attribute list if your renderer supports it, or resize the file before uploading.

How do I set image width and height in Markdown?

In HTML: <img src="pic.png" width="300" height="200">. Setting only width keeps the aspect ratio, which usually looks better.

How do I insert an image from a local file?

Use ![alt text](path/to/image.png) with a path relative to the Markdown file. In VS Code, the preview shows it directly.

How do I add images to a GitHub README?

Upload the image to the repo or drag it into the issue or README editor, then reference it with Markdown or an HTML img tag. GitHub renders width and height attributes.

How do I add a caption to a Markdown image?

Standard Markdown has no caption syntax. Put an italic line under the image, or use <figure> and <figcaption> where HTML is allowed.