5

Here is the complete workflow:

Initialize the repository and the workspace

$ fossil new repo.fossil
$ mkdir workspace
$ cd workspace
$ fossil open ../repo.fossil

Add an image file to the repository

$ fossil add image.jpg
$ fossil commit -m "added image.jpg"

Start fossil server:

$ fossil server

Open the web interface in the browser:

BROWSERNAME 127.0.0.1:8080

Now I'd like to get image.jpg displayed in a wiki page.

Things I've tried:

[image.jpg]
<img src="image.jpg">

I've also tried to toggle the "Use HTML as wiki markup language" in Admin->Configuration

nm3
  • 51
  • 2
  • Note that `fossil ui` is a shortcut for `fossil server` and launching your browser. It will also get the port number right if something else is already using port 8080. – RBerteig Oct 26 '10 at 22:04

2 Answers2

7

see this page. You should use <img src='/doc/tip/image.jpg'/> I believe.

Benoit
  • 76,634
  • 23
  • 210
  • 236
1

I got it to work, though through a roundabout process.

Once you've checked in an image, find it in the Files section of your "fossil ui", click it, and see that it displays the image there for you. From there, you can take the URL of that image (in Chrome, right-click it, "Copy image URL". In my test, that URL was http://localhost:8081/raw/2c2e13a1f71295c3?m=image/jpeg

Then edit your wiki page and add, for example:

<img src="http://localhost:8081/raw/2c2e13a1f71295c3?m=image/jpeg"/>
feuGene
  • 3,931
  • 2
  • 33
  • 46
  • A slightly better way to do this is to use a relative link so that if the domain name changes the links will still work. You can also do this with markdown links, eg: ![](/raw/37e10bc7c5e3b1bb47ec60903bf7d9ee71d1ad0e6fd525b0865eb3bad51c622e?m=image/png) – Adam Shand Sep 19 '22 at 00:04