Hi, I might have hit an edge-case that I can’t find out how to resolve when using images. Here’s what I’m trying to accomplish for our documentation site:
- I have a bunch of screenshots in leaf bundles (like
content/a/image.jpg
) - I’d like to include them in the content, preferably using markdown-style, like

- I’d like to use the full path, because sometimes I re-use content snippets, so can’t use relative paths
- Some of the images should be included in multiple content files (like in
content/b/index.md
includes
as well) - The baseurl includes a subdirectory.
This doesn’t work now, if I reference a non-local image with project-absolute path the links are broken. (They work when using top-level baseurls.) I’ve tried enabling the default render hooks, but still no dice.
One workaround that works is to place such images under the assets directory, but if possible I’d keep them in the relevant content folders.
Suggestions are welcome.
I’ve created a minimal repo that shows the issue: GitHub - fekete-robert/hugo-issue-fullpath-images
(This uses the ananke theme from the hugo quickstart instead of docsy that we use in production, but I don’t think it’s relevant.)
You can build it with
hugo serve --baseURL="http://localhost/docs/" -O
then click on Page a