Reputation: 5493
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.
Upvotes: 481
Views: 377272
Reputation: 69
If you insert an HTML image into unordered lists, then when rendering on GitHub, the lists surround the image, so it makes sense to pack the HTML image into a table
| <img src="https://github.com/favicon.ico" width="48"> |
| - |
Upvotes: 0
Reputation: 6598
Markdown syntax for images (external/internal):

HTML code for sizing images (internal/external):
<img src="https://github.com/favicon.ico" width="48">
Example:
This should work:
[[ http://url.to/image.png | height = 100px ]]
Source: https://guides.github.com/features/mastering-markdown/
Upvotes: 641
Reputation: 39005
You can tried to put the image into table of markdown, like this:
|  |  |
| --------------------------------------- | --------------------------------------- |
|  | |
it will make the image layout like grid, but it could not custom for each single image size.
Upvotes: 7
Reputation: 52758
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">
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
Upvotes: 54
Reputation: 1814
I have used methods described above. Now I am using the method which is a way similiar but more simple to me.
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!
Upvotes: 12
Reputation: 21947
This addresses the different question, how to get images in gist (as opposed to github) markdown in the first place ?
github.com
or cloud.githubusercontent.com
or the like work.
Steps that worked for me in a gist:
Mygist.md
(and optionally more files)Mygist.md
.But: GitHub people may change this behavior tomorrow, without documenting it.
Upvotes: -2
Reputation: 599
GitHub Pages now uses kramdown as its markdown engine so you can use the following syntax:
Here is an inline {:height="36px" width="36px"}.
http://kramdown.gettalong.org/syntax.html#images
I haven't tested it on GitHub wiki though.
Upvotes: 2
Reputation: 3283
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"/>
Upvotes: 14
Reputation: 1337
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.
Upvotes: 98