[Update on April 9, 2014] – updated URL patterns to reflect change in raw GitHub domain names
Adding images to GitHub is pretty straight forward if you can host the images somewhere or if you can put them into your main repository. But, what if you want them ONLY in the wiki? Here’s how to do it!
- Clone your wiki’s repository. The wiki clone url can be obtained by clicking on the “Clone URL” button.
- Add your image to the repository and push it up. In this case, I added smiley.png.
- Add the image to your wiki. The URL will be in the pattern of: https://raw.githubusercontent.com/wiki/[username]/[repository]/[filename]
So, for my example, the image can be loaded from https://raw.githubusercontent.com/wiki/Nerdwin15/imageInWiki/smiley.png. Hope it helps! If not, comment and let me know! You can see my sample repository here.