GitLab: How to embed image from repo in the wiki?

12.4k Views Asked by At

I have a GitLab repository with documentation in the attached wiki (i.e. NOT in the repo itself) and an image file inside the repository itself that I want to embed in wiki pages.

How can this be done?

From a wiki page, I can successfully link to the image using [[../tree/master/pathto/myimage.jpg]] or [[../raw/master/pathto/myimage.jpg]] but

![](../raw/master/pathto/myimage.jpg)

doesn't seem to work.

(GitLab Community Edition 10.0.3)

2

There are 2 best solutions below

1
On BEST ANSWER

Embedding using the absolute path to the repo and image worked:

![](https://url.of.my.repo/raw/master/pathto/myimage.jpg)

1
On

Use the 'Attach a file' button from the wiki page:

enter image description here

It is a triggy operation but sometimes it works :) and you find your attached image:

enter image description here