Thank you all so much for your help!
I’ve found a solution: I deployed a Zfile service on my server, which acts as a private cloud drive, and I have configured it to allow anonymous user access.
I can control the number of files displayed per page and customize how many are loaded manually each time. The permissions for anonymous visitors are set to “preview-only.”
This has solved several key challenges for me:
Complex File Management: It’s much more convenient to manage hundreds of thousands of images through a cloud drive interface.
On-Demand Previews: By default, the drive only lists the files, and a preview is generated only when a file is clicked. This works much like PhotoSwipe. (Although Zfile has a mode to preview all images at once, I believe I can disable it later.)
Discourse Integration: I can now add a “Read online” link in my Discourse posts, which opens the cloud drive interface when clicked. It looks like this: 呂祖刪定全書十二卷 - General - Open TTC | 中華傳統道文化知識庫與在綫社區
Resource Efficiency: This approach avoids the unnecessary resource consumption common with traditional galleries or image hosting applications. The best way to read a book is to load one page at a time, unlike a photo album where you expect multiple images at once. Loading multiple book pages simultaneously would also be visually confusing, as every page looks quite similar.
I am using Discourse as my website’s homepage, managing about 5,000 books across 31 categories. Each post represents a single book, and the Zfile drive manages the individual content pages for each one. This is the best user experience I’ve found so far, and it’s relatively convenient on desktops, mobile phones, and tablets. I hope this can help others who might have similar needs.
A couple of notes:
Zfile isn’t the only option. It seems its interface primarily supports Chinese, which is a benefit for me. If you have any better recommendations, please let me know.
If a 3D page-turning plugin (simulating a real book-flipping experience, like those available for WordPress) ever becomes available for Discourse in the future, please let me know as well.
Thanks again!
4 Likes