Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize image in the wiki of GitHub using Markdown

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:

![image](http://url.to/image.png "Title" {width=40px height=400px})  ![image](http://url.to/image.png = 250x250)  ![image](http://url.to/image.png = 250x)  [[http://url.to/image.png = 250x]] 

Is there a way to get it?

It is preferable without HTML.

like image 585
fhuertas Avatar asked Jun 24 '14 10:06

fhuertas


People also ask

How do I change the size of an image in Markdown?

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.

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

Try resize it!Copy <img> in browser DevTools. Replace ! [](url) to <img> . Add width(and height) attr.

How do I embed an image in Github Markdown?

Drag and drop the image into the Comment field. The image will start uploading to Github servers. 4) Save the markdown file. And you'll see the image placed inline in the markdown file.

How to change the size of an image in GitHub Markdown?

You can change the size of an image in GitHub markdown by using the image link in an HTML img tag: Show activity on this post. You must downsize the image in an image editor.

Why are my images not loading on GitHub Markdown?

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,

How do I change the image on my GitHub wiki page?

On GitHub.com, navigate to the main page of the repository. Under your repository name, click Wiki . Using the wiki sidebar, navigate to the page you want to change, and then click Edit. On the wiki toolbar, click Image .

How do I resize an image to fit a GitHub page?

Resize by Pixels width="150" height="280". Example: 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.


2 Answers

Updated:

Markdown syntax for images (external/internal):

![test](https://github.com/favicon.ico) 

HTML code for sizing images (internal/external):

<img src="https://github.com/favicon.ico" width="48"> 

Example:

test


Old Answer:

This should work:

[[ http://url.to/image.png | height = 100px ]]

Source: https://guides.github.com/features/mastering-markdown/

like image 70
alciregi Avatar answered Sep 27 '22 22:09

alciregi


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.

like image 25
Fritzip Avatar answered Sep 27 '22 23:09

Fritzip