I know how to reference it from wikis but where in GitHub site do I upload the attachment? Thanks a lot!
Asked
Active
Viewed 2.6k times
51
-
1This is a programming Q&A website. – jstephenson Feb 24 '12 at 21:19
-
40I don't think this is really a bad question to ask here. And you actually can do this: the wiki is a Git repo so you can clone it, add your attachments, then commit them. – ron Dec 11 '12 at 20:36
-
25I have nominated this for reopening. The Stack Overflow [scope](http://stackoverflow.com/help/on-topic) clearly includes "software tools commonly used by programmers". – studgeek Aug 04 '14 at 01:03
-
12writing doc is part of programming, especially in a Github wiki. Voted for reopen. Btw @ron gives the answer. – Offirmo Dec 11 '14 at 15:03
-
You can link an image from your repository. See here: https://help.github.com/articles/adding-images-to-wikis/ – Benny Code May 24 '16 at 09:33
-
21. `New issue`, 2. drag your image to upload, 3. copy the link to your wiki. – northtree Nov 26 '18 at 02:28
-
I'm really not sure why this was closed as it's very applicable to programming due to the need for documentation. In addition, there is a solution, if you checkout the wiki, add the files and then commit them, you can link them just fine. In my case I needed to add some example properties files, so I committed and pushed them then linked to them through [properties file](my-file.properties). – Carling Knight Jan 04 '19 at 10:00
-
As mentioned by @Mr_and_Mrs_D , the answer can be found here: https://stackoverflow.com/questions/10045517/embedding-images-inside-a-github-wiki-gollum-repository/12453272#12453272 . To summarize, clone the wiki, commit the files to a subdirectory, then link to them `[example.json](files/example.json)`. – cowlinator Apr 25 '19 at 22:35
1 Answers
16
As of Feburary 14th, 2022 GitHub allows uploading images to Wiki pages by dragging files into the web editor.
Caveat: Files will be uploaded to their githubusercontent bucket, not added to the git repository for the wiki.
Original post:
Just to answer it shortly: You can't. You have to upload your images somewhere else (like in a repository or on an image hoster) and link it
But I agree with @jstephenson

klaustopher
- 6,702
- 1
- 22
- 25
-
1Since the beginning of this month, GitHub supports file uploads in issues https://github.com/blog/1347-issue-attachments – klaustopher Dec 14 '12 at 09:49
-
6
-
1I just have a issue thread named Images that I upload to, then pull from that anytime I need one in my wiki. – dkroy Oct 08 '13 at 18:48
-
6Your answer is misleading see: http://stackoverflow.com/questions/9438197/how-do-you-upload-an-attachment-to-github-wiki#comment19030025_9438197 and http://stackoverflow.com/a/12453272/281545 please edit – Mr_and_Mrs_D Dec 31 '13 at 00:21
-
See instructions for linking to it in a repository here - http://stackoverflow.com/a/10414862/255961 – studgeek Aug 04 '14 at 01:05
-
2Help can be found here: https://help.github.com/articles/adding-images-to-wikis/ – Benny Code May 24 '16 at 09:32
-
5Well a wiki is just a git repo so you can clone it to desktop, add your imaged and upload the repo again. You can access your images afterwards like: https://github.com/YOUR-NAME/YOUR_REPO/wiki/IMAGE.png – Nico Knoll Jan 05 '17 at 10:55
-
You can now drag and drop image file on wiki page in edit mode. This is more up-to-date than Benny Code's link. This question should be reopened. https://github.blog/changelog/2022-02-14-upload-images-to-wiki-pages/ – Erik Ostermueller Jan 02 '23 at 18:17
-
1@ErikOstermueller I have added the link to the answer. Thanks for pointing to the update – klaustopher May 11 '23 at 14:37