Continuing the discussion from Image path:
baseURL set to
https://example.com/hugo/, and I have an image
static/img/image.png that I would like to access in a post inside the
This post advises us to avoid using links like
![This is an image](/img/image.png)
I tried the above Markdown code in a post, and got an 404 error since the generated image path is
https://example.com/img/image.png instead of
So how can @stiobhart’s Markdown code be adapted to this case for displaying images under the
This will work fine for normal use.
I’ll let @alexandros comment on it’s use in a theme’s demo site.
Well I think that this syntax
![This is an image](/img/image.png) will still point to the host root since the site will be served from a subdirectory.
@VincentTam maybe it would it best if you used Page Bundles because only in that case will that markdown syntax image be relative to the content file.
@alexandros Thanks for suggestion. However, the post shown in the screenshot has translations.
$ git grep workday.jpg
Where should the image file be put in this case?
Edited: I figured it out. Either one Page Bundle will do. The non-page resources will be accessible across different languages with the same bundle path and name.