Using images with categories

Hi there,

How can I categories images in assets folder on a gallery.md page.

I have 4 folders in assets/images/tavern:

assets>images>tavern>outside (27 images)
assets>images>tavern>inside (48 images)
assets>images>tavern>kitchen (52 images)
assets>images>tavern>staff (17 images)

these are the 4 folders I currently put these images in assets so I can convert images to webp and resize.

adding front matter for each image in gallery.md page takes alot of time for each gallery

how can you define categories for an image folder directly instead of defining for each image

thanks


currently I am using the with $value.Params to get the .category defined in front matter. Is this the recommend way of doing in Hugo or there is some built in functionality which can categories without having to define in front matter?

The only way to assign a taxonomy term to a content page is via front matter.

1 Like

thanks @jmooring

since images are not the type of content where I want to show a separate page for each category.

  • can I have categories turned off in config.yaml file

if no how can I make sure it doesnt produce category pages for images

do you use the same method I did or there is a better way to call taxonomy in layouts so I can have navigation bar for categories

thanks again for taking the time

If you wish to completely disable the taxonomy system:

disableKinds = ['taxonomy','term']

If you wish to disable the “categories” taxonomy, but keep the “tags” taxonomy:

[taxonomies]
tag = 'tags'
1 Like

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