Giving images tags and filtering them based on it

Hello there again.
The goal is simple, make a site that lists many many images or elements in general which have tags, and then being able to filter based on those tags.
Quite a common task I think so maybe someone has done it before.

was apparently made with hugo, but I don’t know what parts of it do what, and also it seems a bit too “much” for my use case.

I also found this code

which is much smaller and simpler, and which kind of works, however applying the filters doesn’t filter anything.

Does someone know a goto lightweight solution for this problem?

I also wonder how I would go about giving elements a tag to begin with. Say there’s an image, how would you give it a tag?

Thank you

guess this one is still valid which says you cannot directly tag resources (images) but provides a guidance how it might be overcome.

won’t be a trivial task to do

Mhm I see, thank you. It’s not super necessary right now, so I can probably leave it for now as is.

I think it would be good to have a feature to have an easy/intended way of doing something like this, as I feel like it’s quite a common thing people might need or want to do. But I don’t know how hard it would be to implement.
Maybe one day, let’s see