How do you upload images to a gist?

How do you upload images to a gist?

Take a look at this:

  • how to create a gist in github that returns json data
  • Customizing embedded Git Gist text size in html file
  • Issues adding github gist to my blog(using Google blogger)
  • What is the difference between github and gist?
  • Download, Revise, Upload Github Gists with R
  • Send Git commit diffs into gist file
  • What I have tried is drag-and-drop the image file while in the edit mode of a gists. That didn’t seem to work under Crhome and FireFox.

    Update: After a back and forth emails with GitHub, this feature (drag-and-drop binary files, images) isn’t supported.

  • Including 3rd Party Non-GitHub Libraries in GitHub
  • How can I make sure my commit has really happened?
  • How to close a GitHub pull request with a commit message?
  • How do you fully revert to HTTPS after setting up SSH for Git?
  • Github style split diffs on a command-line
  • Git pull request says “This branch has conflicts that must be resolved”
  • 4 Solutions collect form web for “How do you upload images to a gist?”

    I was looking for answer for the same question, here is what I just found:

    1. You can clone your gist as a git repository and add your picture, then push to origin. See loading-thumbnail-into-gist-for.

    2. There is a script written to do this: hecticjeff/gist-img.

    I have not tried the above solutions yet, but pretty sure they should work. I did try using defunkt/gist to update my gist with a png but ended up displaying a binary file in my gist.

    1. Create a gist or reuse one of your gists.
    2. Clone your gist:

      git clone<hash>.git
    3. Add your image to your gist’s repository:

      git add my-image.jpg
    4. Commit the image:

      git commit -m "adding my image to my gist"
    5. Update gist by pushing you modifications:

      git push origin master

    I was looking for an answer to this same question too, in my case in order to be able to upload PDF files. I had trouble with gist-img (mentioned in another answer to this question). I searched some more and discovered gistup, which worked perfectly, the first time I tried it. It uses node and npm, so it should work on most major operating systems.

    If you upload an image, try these steps:

    • Convert your image into DataURI. For example here on
    • Then this string insert to GIST as a text file

    If you want to convert back, there are several options. For example, this:
    Converting data URI to image data

    Git Baby is a git and github fan, let's start git clone.