[SOLVED] Hugo v18-dev markdown images dont't get baseurl prefixed

The following markdown ![](/images/foo.png) renders as <img src="/images/foo.png" alt=""> with no baseurl prefixed.

According to https://discuss.gohugo.io/t/site-based-on-official-hugo-documentation-layout-not-adding-baseurl-to-images/4825/2?u=karl_marklund this is correct behaviour but as far as I understand it is not.

Checking on a site I built some time ago with Hugo v0.16 the baseurl should be automatically prefixed.

Turned out I’ve forgotten about setting canonifyurls = true in config.toml.

3 Likes