Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to I change the size of an image in Github/Markdown?

I'm editing a Readme.md file in a Github repository and have inserted a picture (see https://github.com/khpeek/FMCW-radar). The picture takes up the full width but is rather grainy that way, and I would prefer to make it smaller. Is there any way to do that?

P.S. I've tried the commands on How to change image size Markdown?, but they don't seem to work.

like image 367
Kurt Peek Avatar asked May 30 '16 22:05

Kurt Peek


People also ask

How do I reduce the size of an image in GitHub?

image](https://your-image-url.type) with <img src="https://your-image-url.type" width="100" height="100"> As mentioned by @cbestow (thanks!), it's not mandatory to set both width and height . If only one is set, the other will be adjusted accordingly to preserve the aspect ratio of the image.

How do I resize an image?

Open the image by either right-clicking on it and selecting Open With, or clicking File, then Open on the Paint top menu. On the Home tab, under Image, click on Resize. Adjust the image size either by percentage or pixels as you see fit.


3 Answers

You can change the size of an image in GitHub markdown by using the image link in an HTML img tag:

From this:

![image](https://user-images.githubusercontent.com/link-to-your-image.png)

To this:

<img src="https://user-images.githubusercontent.com/link-to-your-image.png" width="200" />
like image 153
Jonathan Wood Avatar answered Oct 12 '22 05:10

Jonathan Wood


You must downsize the image in an image editor. You can't change image size on GitHub's flavor of markdown.

Also: The image is already very grainy, it's not a result of its size changing.

like image 41
Andy Ray Avatar answered Oct 12 '22 06:10

Andy Ray


For images with links, I used this.

[<img src="./assets/sql.svg" width="30" />](./link/to/sql/file)
like image 38
Kapchi Avatar answered Oct 12 '22 06:10

Kapchi