Skip to content

Embedding images in GitHub wiki

Nicole Vasilevsky edited this page Mar 13, 2019 · 3 revisions

Adding images to GitHub wikis is not as straight forward as other wikis, but the use of images is very helpful for instruction.

URL: Github provides a simple way to add an image if your image is a URL. Simply navigate to the 'edit' page and click on the image link in the GitHub toolbar and add the URL link.

Local Image: However, if your image is on your local machine, you must take a few additional steps.

  1. Clone your repo's wiki repo (i.e., https://github.com/obophenotype/human-phenotype-ontology.wiki.git) which is found on every page of the wiki.

  2. Move your file to the img/ directory in the newly cloned human-phenotype-ontology.wiki.

  3. Commit and push back to the repo

  4. Navigate to the 'edit' page of the page you wish to edit. In the edit box add [[img/nameoffile.png]] where you want the file to appear.