I made something for Mastodon: A gallery mini-app.
You can simply drop it in your Mastodon server's public folder, and it will show images from your server in a mosaic grid with infinite scroll. Supports some configuration as well, e.g. whether to limit it to only local images, or a specific hashtag, or which server to fetch from.
Zundon is a single user instance as home of @zundan as well as a test bed for changes of the code.