miniserve icon indicating copy to clipboard operation
miniserve copied to clipboard

Add image/thumbnail view to directories

Open gyscos opened this issue 5 years ago • 8 comments

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.

gyscos avatar Jun 13 '19 21:06 gyscos

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.

svenstaro avatar Jun 24 '19 01:06 svenstaro

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...

HerHde avatar Nov 27 '19 01:11 HerHde

bump (apologies for necro)

WoMspace avatar May 18 '23 14:05 WoMspace

@WoMspace are you interested in taking a stab at this?

svenstaro avatar May 18 '23 14:05 svenstaro

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

WoMspace avatar May 18 '23 14:05 WoMspace

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.

svenstaro avatar May 18 '23 14:05 svenstaro

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.

intergalacticmonkey avatar Feb 02 '24 09:02 intergalacticmonkey