This addresses the different question, how to get images in gist (as opposed to github) markdown in the first place ?
In December 2015, it seems that only links to files on
github.com
or
cloud.githubusercontent.com
or the like work.
Steps that worked for me in a gist:
- Make a gist, say
Mygist.md
(and optionally more files)
- Go to the "Write Comment" box at the end
- Click "Attach files ... by selecting them"; select your local image file
- GitHub echos a long long string where it put the image, e.g.
![khan-lasso-squared](https://cloud.githubusercontent.com/assets/1280390/12011119/596fdca4-acc2-11e5-84d0-4878164e04bb.png)
- Cut-paste that by hand into your
Mygist.md
.
But: GitHub people may change this behavior tomorrow, without documenting it.