(After cloning the wiki locally)
-
Add images to an
images
directory (or subdirectory below it) in your wiki repo. -
In wiki page markup embed an image with this link format:
[[/images/path/to/image.ext|ALT TEXT]]
Note the leading
/
in the path.You don't need it if all your wiki docs and image files are located at the top level of the wiki (like when you use the online wiki editor), but if you are working with a clone of the wiki, then you can organize files in subdirectories; and in that case, absolute or relative path specifiers are critical so that the path to the image resolves correctly when editing a doc that is located in a different subdirectory.
-
Commit and push changes.
-
This is not the same as providing a link to an image that is part of your project repo (not the wiki repo).
-
To link to an image in a project repo, need full URL that looks something like:
[[https://github.com/username/repository/blob/master/img/octocat.png|alt=octocat]]
-
-
With files in a
files
directory (or subdirectory below it) -
In markup,
[link text](files/path/to/file "ALT TEXT")
-
For example,
[Project Presentation](files/project-presentation.pdf "Project Presentation PDF")
-
Commit and push changes.
-
(https://gist.github.com/subfuzion/0d3f19c4f780a7d75ba2#gistcomment-2684624)
-
For an image named
myimage.jpg
in animages
directory (or subdirectory below), the linking format follows by file type:[[images/myimage.jpg]] [[/images/myimage.jpg]]
- markdown
!()[]
syntax will not work
<img src="images/myimage.jpg">
- img tag works but only with relative path
- does not support figure and figcaption tags
[[images/myimage.jpg]] [[/images/myimage.jpg]] ![](../../blob/master/images/myimage.jpg)
- the markdown
!()[]
syntax works but not relative paths
<img src="images/myimage.jpg">
- img tag works but only with relative path
<figure><img src="images/myimage.jpg"><figcaption>image caption</figcaption></figure>
- markdown
-
(https://gist.github.com/subfuzion/0d3f19c4f780a7d75ba2#gistcomment-2717607)
-
to prevent caching and updates working, append
'?v_DATE'
to the filename:!['Example Rig Presets'](https://raw.githubusercontent.com/wiki/schroef/extra-image-list/images/extra-image-list.jpg?v26-09-2018)
how about these images showing up for when you share the page to Facebook the image is blank how can this be fixed?