As was stated, Discourse probably isn’t helpful, at least with hosting your library. Instead, you might want to consider using a separate image hosting service alongside your Discourse instance.
Below is a list of self-hosted photo gallery services that might come with many features that you’d want: out of box web app, user and mobile friendly interface, directory based albums, search capabilities, etc.
You can run the image hosting service separately and use the URLs from it as embedded iframes on Discourse. This would keep your Discourse DB from having to download all the images, and let the image hosting service handle lazy loading. From there, you can start considering using theme components or plugins for standalone pages for the library, auto linking references from user posts, etc.