Anyways, I have messed around quite a bit with my image render hook to make sure it pulls pictures from /samscorner/images/… but it doesn´t seem to matter what I do, if i use relURL och absURl, i can never get it to att the /samscorner/ part of the url to load the images.
When I inspect the page in my browser, the source always becomes /images/… omitting the samscorner part.
The only way I got it to load was using site.baseurl and using that a a prefix to adress, but that seems like a clunky and broken way to do it.
you stumbled about one common issue regarding images in /static. And already found the solution to mount static to assets and enable the embedded Image render hooks
The embedded hook does not wrap the image in a figure element but prints out a plain image tag.
Update per comment from @jmooring:
if you don’t need the figure element, remove your hook an you are done.
If you want the images be wrapped in a figure element, you could
Option 1: switch to the embedded Figure shortcode which does that for
But than it’s not a markdown link anymore. Markdown could look like:
### my image
{{< figure
src="/images/blog/cytochrome.png"
caption="Image of Sysuphus as the Protein Cytochrome C, carrying electrons"
alt="Oh you read about Sisyphus? Wait until you hear about Na+/K+-ATPase or Cythochrome C..."
>}}
for images without a figure tag you could then use the embedded image render hook by removing your custom one.
some more text
In its current state, the project is not using the embedded image render hook because markup.goldmark.renderHooks.image is set to fallback, which means the project level image render hook is used instead.
these days the figure element is the standard way to go.
the decision is more to use a shortcode or use the render hook. with a shortcode it’s hugo flavoured markdown and has to be typed by the author. with the render hook it just works like markdown and shifts the magic to the hook…maybe a mattrer of personal taste.
More a Merger reading the docs and merging example code… so passing a big amount of your props to the maintainers especially @jmooring