Markdown images get wrong url

You are serving your site from a subdirectory, which is fine, but this means that the host-relative URL to your image is /samscorner/images/blog/suzanne.png.

You could change your markdown accordingly, but if you change your hosting setup you would have to change all the markdown instances as well… this isn’t a great idea.

Instead, enable Hugo’s embedded link and image render hooks to properly resolve link and image destinations:

[markup.goldmark.renderHooks.image]
enableDefault = true

[markup.goldmark.renderHooks.link]
enableDefault = true

[[module.mounts]]
source = 'assets'
target = 'assets'

[[module.mounts]]
source = 'static'
target = 'assets'

See: