Images to be referenced (used) by multiple pages

General question here as I’m learning Kirby to see if it’ll work for my situation:
I have images that will have multiple tags (or some other taxonomy in their metadata) and then create pages (galleries basically) for each tag that load images if they have the relevant tags. Ultimately I’d love to just tag each image and then have pages automatically created for each tag, but one step at a time.

If I find the images via php, I’d have to make separate templates for each page? Is that correct? I’m looking at lots of templates if that’s the case. For security reasons a php snippet can’t be loaded in the page somehow?

No. You could create a single template, and in the controller for that template filter your images by tag. The url could look either like this:

mydomain.com/gallery/tag: sometag

so really using a parameter

Or you could do it via a route with a url like this

mydomain/gallery/sometag

where sometag is just a placeholder for the actual dynamic tags.

If I’m understanding correctly (pardon my minimal knowledge about how this works) the URL method would autogenerate a viewable page based on the tag, but wouldn’t actually create any pages within the content structure right? I assume I could still make a page that lists the tags as if they were pages…
Thanks I’ll need some time to digest all of this-

You would only need one page (the gallery page), the rest would be handled via the URL parameter, no pages in the file system needed, exactly.

It would basicall work like these examples, but for files instead of pages

I think I’m very close now but I’m missing some specific command. Currently I have this in the photographer template to show all their photos:

<?php $currentPhotog = $page->photog(); ?>
<?php $gallery = $site->find('2022')->children()->images()->filterBy('Photographer', $currentPhotog)->sortBy('sort', 'filename'); ?>

And that works if I specify the “2022” page, but is there something I can use there instead to search all children of the entire site and not one specific parent page?

Yes, $site->index()

Thank you-
I have one other unrelated question if that’s ok:
Coming from Wordpress I’m used to managing all content through the web dashboard. I read that with kirby it’s not recommended to use the panel via the web. How do people use it then?

Where did you read that? Of course you can use the Panel through the web, that’s why the Panel exists.

Oh maybe I misunderstood. In the docs it says you cannot install the panel on a public server by default, and “It’s recommended to remove this setting after the installation on your remote server is complete.”

That‘s a security feature that prevents that just anybody can install the Panel on a public server in case the admin forgot to set it up.