Resize image in the wiki of GitHub using Markdown
Solution 1
Updated:
Markdown syntax for images (external/internal):

HTML code for sizing images (internal/external):
<img src="https://github.com/favicon.ico" width="48">
Example:
Old Answer:
This should work:
[[ http://url.to/image.png | height = 100px ]]
Source: https://guides.github.com/features/mastering-markdown/
Solution 2
On GitHub, you can use HTML directly instead of Markdown:
<a href="url"><img src="http://url.to/image.png" align="left" height="48" width="48" ></a>
This should make it.
Solution 3
I have used methods described above. Now I am using the method which is a way similiar but more simple to me.
- First create add README.md file to your project.
- Then upload screenshoots or whatever description images needed to your project main directory.
- After uploading image Assets use html to refer these assets directly without using link like below
Like this:
<img src="icon.jpg" width="324" height="324">
<p align="center">
<img src="screen1.png" width="256" height="455">
<img src="screen2.png" width="256" height="455">
<img src="screen3.png" width="256" height="455">
</p>
On above example I have used paragraph to align images side by side. If you are going to use single image just use the code as below
<img src="icon.jpg" width="324" height="324">
Have a nice day!
Solution 4
Almost 5 years after only the direct HTML formatting works for images on GitHub and other markdown options still prevent images from loading when specifying some custom sizes even with the wrong dimensions. I prefer to specify the desired width and get the height calculated automatically, for example,
<img src="https://github.com/your_image.png" alt="Your image title" width="250"/>
Solution 5
Resize by Percentage width=50% height=50%
. Example:
<img src="https://i.imgur.com/ZWnhY9T.png" width=50% height=50%>
Resize by Pixels width="150" height="280"
. Example:
<img src="https://i.imgur.com/ZWnhY9T.png" width="150" height="280">
Some tips
-
To get a githubusercontent link for an image, drag and drop the image into any issue, and copy/paste the url from the code that is automatically generated. Example code:

-
There is no way to change the size of an image if the markdown format is of the form
[]()
- so stop looking right now! - you must use<img>
instead -
Another useful summary of conventions that do and don't work here
-
All of the above is from here

fhuertas
Updated on July 11, 2022Comments
-
fhuertas 6 months
I'm writing a wiki page on GitHub, and I'm using Markdown.
My problem is that I'm putting a large image (this image is in its own repository) and I need resize it.
I have tried different solutions, but they do not work:
   [[http://url.to/image.png = 250x]]
Is there a way to get it?
It is preferable without HTML.
-
fhuertas over 8 yearsThanks for the solution, is it possible without html code?
-
Sam Dutton over 7 yearsThanks.
<img src="..." width="48">
works in READMEs for images uploaded to GitHub. -
Jonik over 7 years@SamDutton: It seems to work fine also for images hosted elsewhere.
-
I'm a frog dragon about 7 yearsJust want to note that you can exclude the
width
so that it can scale the width based on height automatically. -
koppor over 6 yearsWhere is the resize aspect?
-
Nicolas Miari about 6 yearsNot just on Github; I believe inline HTML is allowed within Markdown in general...
-
spikeyang about 6 yearsTest it today. Github won't recognize the syntax of [](.. =400) or [](... =400px), so if I need to resize the picture, I have to use the <img/> syntax.
-
Allen Vork almost 6 yearswhat about a gift
-
Julian over 5 yearsWhen you replace the markdown syntax with the html, you don't see the correct size in the Github preview. But it does work :)
-
Eduardo about 5 yearsThe crossed out answer works if the image is added to the wiki itself.
-
user310291 over 4 years@nicobo I tried seems it doesn't work for external image ?
-
DanMad over 4 yearsWhat @Eduardo said... The 'Old Answer' that you have crossed out is what I have been scouring the internet for—still works great for relative paths (assets inside the wiki). Additionally, I had to add one or two images inside of a table. The pipe character was giving me grief because of typical table formatting in markdown. Escaping the pipe inside a table cell is still valid:
[[ http://url.to/img.png \| height=48px]]
. -
DavidJ almost 4 yearsThis works in GitHib pages using Jekyll, FYI (I realize this isn't precisely the OPs question)
-
shim over 2 yearsI wrote this script which can be added to Automator using a Javascript quick action and then with a keyboard shortcut you can quickly convert the automatically generated Github image markdown with the HTML for easy resizing while the text is selected. I would also recommend submitting feedback to Github to get them to simplify this.
-
Rishabh B about 1 yearThe question clearly asks to resize image using Markdown, so could you provide a method to do it in this way. I searched around internet, but no concrete answer. I don't think this should be an accepted answer.