miniserve
miniserve copied to clipboard
Add image/thumbnail view to directories
In a directory of images, it could be nice to have a way to preview the images. One naive solution would be to directly embed the image in the page; a maybe better way would be to auto-generate thumbnails on the fly to save on bandwidth (and maybe cache them in a temporary directory), but that may be trickier.
Yeah, that would be really cool. I think given that we're using rust, we can easily generate them on the server on the fly in parallel.
And maybe add a gallery view to cycle through the images with the arrow keys instead of going back and clicking the next one. Even if it's a bit off-topic...
bump (apologies for necro)
@WoMspace are you interested in taking a stab at this?
gosh you know it seems the perfect kind of project for me to brush up on rust, but I'm absolutely booked full. Assuming this issue is still open in a few months and I remember to come back to it, I do think I'll take a stab at it
Alright as I'm somewhat unlikely to work on this myself anytime soon I think there's a good chance you can just work on this when to in feel like it. I still think it's a cool feature if implemented neatly.
This would be really great. There's no need to reinvent the wheel, either: https://askubuntu.com/a/1368911, https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html
Thanks to this awesome spec, all you have to do is parse the thumbnailer entries in /usr/share/thumbnailers
and ~/.local/share/thumbnailers
and execute the specified programs for each file of each mime type that you want to display thumbnails for. GNOME's built-in thumbnailers, and most installable thumbnailers such as ffmpegthumbnailer
use this spec and drop files in the "thumbnailers" directories.