How to output page resources of each language in same folder

Hi
Hugo outputs page resources for each language in each language’s folder and thus creating duplicates.
I tried Headless Bundle and I created a folder media in content/ and it didn’t worked. Actually I want all resource in one folder for each language and page. Like a media folder which store all resources.


I tried various ways:
I placed the media folder in content/' and it's giving something like nopPagethen moved the media folder intocontent/en/ and access it like:

{{ (.Sites.First.GetPage "media").Resources -}}

But it’s showing an empty array.

Thank you.

I think you will have to place your images in the assets/ directory, and use resources.GetMatch instead of .Resources.GetMatch.

I cannot think of another way to avoid duplicate image files in the publish directory.

1 Like

Do you have idea if working with assets directory resources how to use resources param in front-matter?

The resources array in frontmatter describes one or more Page Resources. It has no connection to global (assets directory) resources.

Ok thanks a lot then I’ll find any other way