Issues adding images to my package docs (built from Documenter.jl)

After a lot of trial and error I finally found out how to properly embed and render HTML code in .md files fed to Documenter.jl, but now I’m finding that the images aren’t showing up in a table I developed to place two images side-by-side.

I’m sure it’s a very very simple solution that I’m just not seeing for some reason. You’ll see in the docs here that the images are missing.

Here’s the html code I’m using:

<table border="0"><tr>
<td> 
	<figure>
		<img src='figs/sources_block_of_1.png' alt='missing' /><br>
		<figcaption><em>Block size of 1</em></figcaption>
	</figure>
</td>
<td> 
	<figure>
		<img src='figs/sources_block_of_3.png' alt='missing' /><br>
		<figcaption><em>Block size of 3</em></figcaption>
	</figure>
</td>
</tr></table>

The images are housed in my package repo here.

Anyone know what I’m missing here?

I switched to use the direct paths of the images at raw.githubusercontent.com, so it is working now! It would still be valuable to know how link to images based on their relative paths to the src/ folder, but for now this will do.

Just use a relative path from the page you include it at? ../figs/sources_block_of_1.png seems to work.

2 Likes

Ah, I was using the relative path based on my local file structure and not based on the paths created by Documenter. Thanks so much! I’ll try this out now then I’ll mark your response as the solution.

For future reference, there is an open issue about this with some additional discussion: #921.

2 Likes

It might be updated as of Oct 2021:
figs/ should do fine instead of ../figs/.