Robe
Robe

Reputation: 383

Add images to README.org files in Gitlab

A method to add images to markdown files in Github is described here. However, I would like to add images to *.org files in Gitlab (both Github and Gitlab support README.org files, so the solution should be equal for both). I've tried:

[[file:./path/to/file.svg]]
[[sometext][file:./path/to/file.svg]]]
[[file:./path/to/file.svg]][sometext]]

Markdown's format doesn't work either:

![alt text](./path/to/file.svg)

A now removed answer suggested using

![][1]

[1]: ./path/tofile

which doesn't work either.

What is the right way to do it?

Upvotes: 6

Views: 5820

Answers (2)

basquiatraphaeu
basquiatraphaeu

Reputation: 667

#+caption: <img description> (optional)
#+attr_html: :width 50 px
#+attr_html: :height 50 px
[[<path to image>]]

For more check the orgmode manual.

Upvotes: 0

Robe
Robe

Reputation: 383

Insetting html works for both Gitlab and Github.

#+html: <p align="center"><img src="path/to/file" /></p>

Upvotes: 5

Related Questions