Hosting images have always been a tricky part for me. Recently I got the opportunity to write a lot of documentations (ReadMe on GitHub). One thing which was constant with the README.md files – screenshots.
I prefer to add screenshots wherever necessary to be more precise about the steps to be followed. But taking a screenshot and then hosting it on a third party website was too much of a hassle. There were times when I wanted to host images on a free service and use it in apps I was developing. I decided to scratch my own itch and come to a definitive solution once and for all!
STEP 1: Take a screenshot
Now, this will work with any image. Screenshots are something I am taking as an example. There are two ways you can take a screenshot:
- Use the native Print Screen method for your OS
- If you are on a browser (Chrome/Firefox) you can use an extension called LightShot. With this tool, you can take and save parts of the screenshot i.e. crop the screenshot and save the important part!
STEP 2: Open a GitHub issue
Yes, you read it just right!
If you don’t have a GitHub account, then sign-up for a new account and create a simple repo. I’ll use my scalable-angular-folder-structure repo from my GitHub account.
Click on “Issues“.
After that, click on “New Issue“.
STEP 3: Host it!
Now if you are observant enough (or a observant freak like me), you’ll notice GitHub is giving an open invitation to host images for free!
The only thing you have to do is Drag and Drop any image/screenshot you want to host! Once you do that, GitHub will be kind enough to host the image/screenshot on its server and provide you with a link!
GitHub will give back something like:
The link is between the “(” and “)”.
I just hosted this image on GitHub and I can use the link anywhere! Check it out here.
STEP 4: Enjoy and forward this little hack!
So, that’s it. Host all your images for free. If you do like this, do share it with your colleagues in office and all your dev-friends!
12 comments / Add your comment below
Quality content is the important to attract
the users to visit the site, that’s what this web site is providing.
Thank you so much!
What is the Limit for hosting the images from single GitHub account and what’s the expiry for those images?
we’re just uploading the image as you said should we submit that issue after uploading all the images or just uploading them and use the links and leave that page ?
1. There is no limit to uploading the images. I have been uploading images on GitHub from last 2 years and haven’t encountered a single broken link – hence I don’t think there is an expiry too.
2. No, you should not submit the issue after you have the link. Just use the link and leave that page.
3. You can upload multiple images at the same time or one by one in the same issue’s comment and once you have all the links, you are good to go. Do not submit the issue!
Hello, I think your site could be having browser compatibility problems.
Whenever I take a look at your web site in Safari, it looks fine however, when opening in Internet Explorer, it’s got
some overlapping issues. I merely wanted to give you a quick heads up!
Other than that, excellent site!
Thank you for taking out time to read my blog! Means a lot.
Will surely look into it. Thanks for the heads up! 🙂
Hey this is somewhat of off topic but I was wondering if
blogs use WYSIWYG editors or if you have to manually code with
HTML. I’m starting a blog soon but have no coding knowledge so I
wanted to get advice from someone with experience.
Any help would be greatly appreciated!
Even though I am a web developer myself, I still chose to go with WordPress for my blog due to a couple of reasons:
1. Minimal effort in setting up the blog
2. Free, but elegant themes
4. Plugins – Like Google Site Kit. I can see my Analytics, Adsense, Search console – all at one place.
I went with it primarily to save a shit load of time!
I appreciate, result in I found exactly what I was taking a look for.
You have ended my 4 day lengthy hunt! God Bless you man. Have a great
I am glad it helped!
Amazing! Short and to the point. Easiest way to host images on Github. No more uploading images as part of my repo just to include them in the README!