How to include images into a FORD documentation?

In the README.md of ForColormap, I have a logo which is displayed by GitHub thanks to that markdown code:

![](logo/logo_forcolormap-roma_8.svg)

But it does not appear in its FORD documentation. As I would like to add a few more images into that README, I would like to see them in the FORD doc. But I have found no information in the documentation of FORD while searching for keywords like picture or image.

@jacobwilliams has used a HTML tag in his README.md to make his logo appear in the FORD documentation of his JSON-Fortran library:

<h1 id="json-fortran"><img alt="JSON-Fortran" src="/media/json-fortran-logo-2.png" title="JSON-Fortran logo"></h1>

Are you aware of other possibilities?

This should work in principle. Are you sure the relative path is correct?

I’m generating documentation for FSML with FORD and include an image in my doc.md with

![FSML modules. \label{fig:fig1}](media/fig/modules.png){ width=40% }

In the same file, I also specify the media directory (where figures are copied to) relative to the generated documentation root directory.

I can also have a closer look at your ForColormap files later.

Thanks @fxm for your answer. My code is similar to yours. Maybe the problem is just that my logo is a SVG file and FORD does not manage that format? (but isn’t it managed rather by the browser?)

In that case, I will soon see it as I have included two PNG files in the README.md in my development branch. When I will merge that branch next week and regenerate the FORD doc, I can hope seeing my pictures, like your.

And @fxm , how did you make your nice “Developer Info” frame with your avatar in your FORD doc?

I just tested this. FORD handles SVG fine. The problem is that the path you specify is not relative to the generated doc/ root directory and your logo/ folder isn’t copied over. If you manually copy your logo folder into the docs folder, it will show up:

One reason I created a separate doc.md file from the README.md was to have more flexibility (differences to what’s displayed on GitHub), and I specifed a lot of FORD options in the header, including the media_dir as well as developer info, including the picture, which is just a link to my GitHub profile picture:

author_pic: https://avatars.githubusercontent.com/u/46564062?v=4

You can check the header of doc.md. In the online FORD documentation, this page has a more complete list of options.

Thanks a lot @fxm ! I will try next week to add a doc/ directory and I will study the way you use your FORD doc. Until now, I was just using the README.md and the generated API tabs. But I can see with your Handbook section that I can do much more.