كيفية تضمين عدد كبير من صور AVIF في منشور واحد لقراءة الكتب عبر الإنترنت؟

Hello,
My project is to build a community focused on Tao Te Ching culture. I have over 5,000 ancient books that I need to display, and I have compressed all of them into the AVIF image format. Some of these books contain as many as 2,500 AVIF images.
My question is: How can I insert these images into a single Discourse post to enable my users to read them online?
I am looking for a solution, perhaps a plugin, that can provide the following features for users within a post:
Easily flip back and forth between images (like turning pages).
The ability to jump directly to a specific image number.
Crucially, images must be lazy-loaded; they should only load when the user navigates to them, not all at once when the post is opened.
My files are all organized in numerical order and are in AVIF format. Each book is contained within its own folder. The average image size is 150kb, and books typically have between 300 to 1,000 pages, with some exceptions reaching 2,500 pages.
Why do I have this requirement?
My collection of books is vast, currently exceeding 350GB. Compressing them to AVIF was necessary to manage storage.
Formats like AVIF and WebP are not easily packaged into a single PDF file.
Packaging the books as ZIP or RAR archives prevents online reading. Using e-book formats like CBZ would create too high a load on the server.
Thank you very much for your help!

I rarely say this, but I’m not sure that Discourse is a good tool for your problem.

If you want to anyway, I’d probably do something like create a topic per book and maybe a post per chapter, if that makes any sense (maybe there are no chapters?).

Then you could use an import script that would read the directory name and create a topic and then do something like

files.each do |f|
   u=uploader.create_upload(1, f.path, f.filename)
   raw += uploader.html_for_upload(u, f.filename)
end

And then you would use that raw to create a topic.

You’d need to look in the import scripts directory to find some examples of creating topics, but that’s a rough idea.

And that would then put all the images in a single topic/post. And then there are some tools that will let you scroll through a bunch up images, I think. Perhaps someone else has paid more attention to those than I have.

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.

إعجاب واحد (1)

I don’t believe this is matter of hosting, but usability when reading. For more western stylish people this is very similar question than showing comics. And for that might find suitable platforms, but I’m quite positive that even WordPress can offer an solution.

And then connection of content and community/discussion by Discourse is totally trivial.

But in Discourse ecosystem something what Discpage offered, could be another solution. But it is broken.

إعجابَين (2)