Changing image size in Markdown

18 February 2021, 7:56 am by antelove19

Changing image size in Markdown
Changing image size in Markdown

Question

I just got started with Markdown. I love it, but there is one thing bugging me: How can I change the size of an image using Markdown?

The documentation only gives the following suggestion for an image:

![drawing](drawing.jpg)

If it is possible I would like the picture to also be centered. I am asking for general Markdown, not just how GitHub does it.


Answers

With certain Markdown implementations (including Mou and Marked 2 (only macOS)) you can append =WIDTHxHEIGHT after the URL of the graphic file to resize the image. Do not forget the space before the =.

![](./pic/pic1_50.png =100x20)

You can skip the HEIGHT

![](./pic/pic1s.png =250x)

You could just use some HTML in your Markdown:

<img src="drawing.jpg" alt="drawing" width="200"/>



Video not yet
0 comment