Hugo

Serve Image from within 'content' subdirectory

Hi. I’m new to Hugo and came across the following issue:

The next answer:

says author finally succeed putting images resources to content’s subdirectory. However, it’s not the case with my attempts.

Just to be clear, the thing I want to reach is to have the following dirs structure like the following:

post
├── amazingStory
│   ├── Amazing-Story.md
│   └── images
│       └── img1.jpg

and then refer to the image:

<!-- in of Amazing-Story.md -->
...
Story is started ![here](./images/img1.jpg) 
...

The questions I have:

  1. Is it possible?
  2. Can I see any examples anywhere?

I’ve taken a look at 4-5 or even more themes’ exampleSite. And non of them has post
subdirectories supplied with resources.

Thanks for your support.

We have a lot of documentation for including resources with the HTML document that references it. Specifically, check https://gohugo.io/content-management/page-bundles/ and https://gohugo.io/content-management/page-resources/.

A post was split to a new topic: Use Page Resources img instead of from static in hugo-cards theme