Display an image in github profile README?

Viewed 2656

A github profile README can be created by creating a repository of the form username/username. The README will display above pinned repositories on the user's profile.

However, some images don't display, and from some manual testing, it appears to have something to do with either dimensions or the image file size.

What specifications must an image meet in order to display correctly in an otherwise empty profile README? That is, a profile README that simply contains:

<img src="https://github.com/favicon.ico" height="240" width="480">

Note: here's how the README displays when it fails to load the image:

Issue

2 Answers

Solution (via email from github support):

If you drag and drop an image into a pull request or issue comment it will automatically generate a link to the file on githubusercontent.

Which results in this code, which works perfectly:

![](https://user-images.githubusercontent.com/12915136/87480122-ab9e5e00-c5fa-11ea-82b1-b4d3340b5c27.png)

The reason only some images would display as expected in the original code was due to a bug (which has since been reported)

Looks like alternatively you can go to the image file in the readme repo, click on it and hit Download, it will show you the raw url like https://raw.githubusercontent.com/.... which you can use in the readme

Related