As a developer, we sometime want to share our work as public. So all people can accessed our work as reference for their work. In github, often developer publish their source code to a custom or library. Some of experienced developers will also provide documentation for their source code/solution with detailed README or even wiki pages. But most of developer also have same issues about

how to upload images that you wanna shown in README file(s)?

When adding file to the repositories, you are asking Github to track changed and commit for each asset in your repositories. For this long time I always provide images to be shown in README file(s) using third party, Flickr. But that is not convenient for me to always open the other tab for only upload images, and when we opened our repository that have images that has included by third party like Flickr, It gonna slow down to load. The only solution is using CDN assets to manage our assets (images, pdf, others). But Github currently doesn’t provide an asset management tool for developer repositories. But Github DOES have a hidden feature that can be used as a CDN for assets (images, pdf, others). It’s called issues feature.

By using issues feature, it gonna make super easy to uploaded file that are associated with your repositories and these files are not part of its commit/change processes. If you create an issue within your repositories, you can drag-drop files and it will be automatically upload and attach static content to your repositories.

Click on Issue tab

Create an issue with appropriate title to the content of your images.

issue

Create a new Issue

In the sample below, I am going to upload images to be provided in my README.md file. I created new issue titled with  Image for README. You can drag-drop 1 or more images into the writing section comment box. All image or file(s) will be instantly upload to the hiddent Github asset manager.

issue

After each processed upload done, Github will provide text and link of your image(s) that you uploaded.

issue

Using uploading image or assets (e.g PDF, DOC, txt, etc..)

After you submit new issue, you will be able to see recently image(s) you attached before and it will be rendered perfectly. From here then you can use the link provided by Github by right-click on the image.

issue

Insert image to README

After you get the link provided by Github, then we are ready to include it to README file. Open your README file then edit it. For includ image into README file you can use this tag ![alt tag](https://link-images.com/image.jpg)

issue

I think this is a HACK only usefull until Github finally provides a CDN upload feature for assets. Until Github provide that feature, enjoy this tricks!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s