The Onist

The Onist


Tags


Free Image Hosting via GitHub

A neat trick on how to add images to a GitHub's README.md without the need to add the image to your repo or hosting the file yourself elsewhere.

Today I learned a neat little trick on how to add images to a GitHub's README.md without the need to add the image to your repo or hosting the file yourself elsewhere. This is super helpful if you'd like to show visitors screenshots of an application or any other sort of visual documentation related to the repository. Let's get started!

First you'll navigate to the GitHub repository that you'd like to add an image to. Next go to the issues tab and click the New Issue button. Note that you will not actually be creating an issue but instead just using the dialog to trick GitHub into hosting the image for us.

While on the "New Issue" page, near the button of the description field you will see a message instructing you on various ways to add an image. After adding an image by whatever means you choose, you should now see something similar to the image below.

Take notice of the image url in the markdown that GitHub created. It is hosted in GitHub's cloud! Sweet! Now just copy the image markdown and go back to the repositories homepage. Open up and edit the README.md file and paste the markdown wherever you'd like the image to render.

Save the file and enjoy your new image hosted by GitHub! Here is an example of one of my personal repo's using this trick.

Share Post
View Comments