# Understanding resource paths in nested subsections

**URL:** <https://discourse.gohugo.io/t/understanding-resource-paths-in-nested-subsections/53303>\
**Category:** support\
**Tags:** resources\
**Created:** [January 28, 2025, 8:37am UTC](https://discourse.gohugo.io/t/understanding-resource-paths-in-nested-subsections/53303 "2025-01-28T08:37:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidsneighbour](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/davidsneighbour/32/24507_2.png) [@davidsneighbour](https://discourse.gohugo.io/u/davidsneighbour)\
**Post date:** [January 28, 2025, 8:37am UTC](https://discourse.gohugo.io/t/understanding-resource-paths-in-nested-subsections/53303/1 "2025-01-28T08:37:35Z")

</div>

I have an “organically grown” content structure like the following:

```auto
section1.md
section1/section2/_index.md
section1/section2/section3/index.md
section1/section2/section3/image.png

```

Trying to show the image under `section3` I would expect the following to work:

```markdown
![image](image.png)

```

It does not (tested in various Hugo versions from current down to v0.130.0). What works is this:

```markdown
![image][section2/section3/image.png]

```

I have two questions related to understanding the way resource paths work in future uses:

- why doesn’t the leaf bundle inside the `section3` know the image without a path?
- why does it work using `section2/section3` as path, without `section1` involved?

Sidenote: I can’t just move section1.md inside the `section1` folder as for instance `_index.md` because that influences how `section1/section2/_index.md` is built. Also, it’s not a “proper” list page and uses a layout template. Somehow, the `_index.md` stops working when moving `section1.md` in. It’s a card house. However, the way they are currently located, they use the layout files they are supposed to use.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [January 28, 2025, 4:52pm UTC](https://discourse.gohugo.io/t/understanding-resource-paths-in-nested-subsections/53303/2 "2025-01-28T16:52:50Z")

</div>

> [@davidsneighbour](#):
>
> It’s a card house.

Yeah.

```plaintext
content/
├── section1/
│ └── section2/
│ ├── section3/
│ │ ├── image.png
│ │ └── index.md
│ └── _index.md
├── _index.md
└── section1.md <-- not a great idea

```

In the above, the only section page (`kind` is `section`) is `content/section1/section2`.

The presence of `content/section1.md` makes “section1” a page not a section. I’m not even sure that’s determinate from one build to the next, though the `--printPathWarnings` flag does not indicate a collision.

content/section1/section2/section3/index.md

```plaintext
+++
title = 'Section3'
date = 2025-01-28T08:40:49-08:00
+++

![image](image.png)

```

The above works fine for me. Try it:

```plaintext
git clone --single-branch -b hugo-forum-topic-53303 https://github.com/jmooring/hugo-testing hugo-forum-topic-53303
cd hugo-forum-topic-53303
hugo server

```
