Placement of images where and why?

Hi there,

In hugo i see 2 options for image placement other than the static folder which are:

|__assets
   |__images
       |__listings
           |__1 
               |--image1.png



|__content
   |__listings
       |__1
           |__images
               |--image1.png

Which one I should use and why? unable to understand the main difference for example I have website showing property listings for rent each property have a name such as property 1 etc. I’m unable to understand the image placement to choose the directory assets or content? which one is more compatible or recommended by Hugo? or is it just a simple preference and entirely depends on me?

Thanks

With this structure…

content/
β”œβ”€β”€ posts/
β”‚   └── post-1/
β”‚       β”œβ”€β”€ a.jpg
β”‚       └── index.md
└── _index.md

…use this markdown:

![something](foo.jpg)

With this structure…

content/
β”œβ”€β”€ posts/
β”‚   └── post-1/
β”‚       β”œβ”€β”€ a/
β”‚       β”‚   └── foo.jpg
β”‚       └── index.md
└── _index.md

…use this markdown:

![something](a/foo.jpg)

Unless I have a lot of resources in a page bundle, I use the first one.

1 Like

Thanks @jmooring for taking the time, I have a follow up question.

Q:1 Do the both options let me use the Hugo image processing such as resize, filter etc.?

Q:2 is there any disadvantages when it comes to Hugo pipes?

Thanks

Yes

No

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.