Generate thumbnails from a directory of 10000 photos?

apps

#1

Are there any good programs/scripts that can serve up thumbnails from a directory with 10000’s of photos?

I’ve tried using Gallery2, and importing the photos into an album. That’s time consuming and I don’t need the richness of gallery.

I just want something quick and dirty, ideally with pagination, to browse through these photos.

Thanks.


#2

does it have to be web based?


#3

The servers have ImageMagick installed and you can create a shell script that will generate thumbs:
http://www.imagemagick.org/script/convert.php


#4

I can’t help but mention here that it is really not a proper use of a shared web server’s resources to generate thumbnails. Hey, a few here and there are one thing, but when you are talking about the processing resources required to thumbnail “10,000’s” images, this should only be done a a VPS or Dedicated server, if at all.

While popular image gallery web applications will do this for you, common sense is called for. If you are not running a VPS or a dedicated machine, the upload/resize/thumbnail dance is really only appropriate for 5-10 images at at time, not for large batches of images.

Really, this processing is better done on your own computer, and then the generated thumbnails generated can be uploaded/rsynced to the web server for distribution.

I’ve done this for years, using batch image processing tools on my home machines (Google can help you find a free one you like, whatever your platform).

Think about it … the webserver is designed to serve web pages, and really isn’t a general purpose data processing platform. Sure, we give you shell access for the occasional scripting/processing stuff you need to make a site interactive, or accomplish an ancillary function related to serving your site, but that should not be considered an open invitation to use that access as a mass image processing engine. :wink:


#5

Considering that it’s for his photo site, I don’t find the request too out of line, except for the scope of the project. In which case niceing the command would help ease the load.

I use Graphic Converter for the Mac which does all this for me locally. If the OP (hopefully) has the site backed up on his home computer, it would be quicker to do it at home and upload the thumbnails.


#6

[quote=“sdayman, post:5, topic:53209”]
Considering that it’s for his photo site, I don’t find the request too out of line, except for the scope of the project. [/quote]I completely agree with you; it was precisely “the scope of the project” that prompted my post! :slight_smile:


#7

Depending on what the size of your thumbnails I use some like find . -name “*.jpg” -exec convert {} -resize 80% /home/thumbs/{} ;

It’s somewhat intensive on cpu, but taken that it does one by one and not in parallel it’s not that overkill, you can even slowdown or use nice to not hit the server you’re on.

I just remembered a program a friend of mine used to generate static pages (albums) for his pictures http://cthumb.sourceforge.net/ it does pagination and a lot of things you may like :smiley: