Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
How to Resize an Image in a Github Issue (e.g. Github flavored Markdown)

How to Resize an Image in Github README.md (i.e. Github Flavored Markdown) in 2020!

Percentage:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width=50% height=50%>

Pixels:

<img src="https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png" width="150" height="280">

Quick 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: ![image](https://user-images.githubusercontent.com/16319829/81180309-2b51f000-8fee-11ea-8a78-ddfe8c3412a7.png)

  • If anyone knows of a very easy to use (preferably browswer based, client side) app that converts a link an image in a repository to a githubusercontent/raw link, please comment with the app url

  • 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

@chrismccolgan

This comment has been minimized.

Copy link

@chrismccolgan chrismccolgan commented Aug 6, 2020

Thank you for this guide! I was still having issues with GitHub distorting my pictures on my phone screen while looking fine on my laptop. To fix that I just left off the height value.

@subwaymatch

This comment has been minimized.

Copy link

@subwaymatch subwaymatch commented Sep 3, 2020

Very useful. I didn't realize the ![]() format didn't support setting sizes anymore. Thank you.

@luizdias

This comment has been minimized.

Copy link

@luizdias luizdias commented Oct 27, 2020

Thank you for this and for the important tip:

There is no way to change the size of an image if the markdown format is of the form - so stop looking right now!
😃

@sanderjo

This comment has been minimized.

Copy link

@sanderjo sanderjo commented Nov 14, 2020

Yes, works for me. Thanks!

@tango4567

This comment has been minimized.

Copy link

@tango4567 tango4567 commented Dec 11, 2020

Thanks, this very straight and clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment