I have a loosely organized directory tree of photos on my site. I'd like a nicer way to present these than simple Apache directory listings, but I'd rather reuse existing code (even if possibly modifying code, templates & stylesheets) than start from scratch. I've poked around a bit, but nothing I've seen seems to quite meet the rough criteria I have in mind. For people that have photo galleries on your sites, are there good solutions available from somewhere like CPAN or Sourceforge?
Ideal functional criteria that I'm looking for:
- Easy, automatic. If I transfer a new directory of image files from my camera to, say, /web/htdocs/photos/2003/08/09/ (or something more descriptive like 09_roadtrip or 09/roadtrip etc), then this should become visible at an associated url with no additional setup work required, complete with thumbnails, titles, maybe an image resize feature, and other page decoration.
- Listings should allow for visitor comments. If I put up a directory with 100 photos from a relative's wedding, I don't want to be forced to fill in the details for what every image depicts -- but if visitors want to add that that's fine with me.
- Categorization: There should be an optional way to add metadata, so that for example if I or a visitor indicates that a given picture is of a certain person, place, or event, then visitors should be able to browse or search within that category. Ideally, index level pages should be aware of the categories associated with images in that section, and users should be able to follow links back & forth between (say) a directory hierarchy focused organization of links and a category focused organization.
- Something able to run mod_perl1 would be ideal. PHP would be tolerable if the package were very nice (I might as well learn PHP sooner or later...), but given the choice between a "C+" mod_perl application and a "B+" PHP one, I'll probably go with mod_perl. Anything written in Python / Ruby / TCL / Scheme / Bourne / Zope / compiled-C would get a silly look but not necessarily be ruled out. Anything in ASP or JSP is straight out.
- I'm not worried about most internal or external dependencies. That is, having to pull in modules from CPAN is fine with me, as is depending on Imagemagick. If it uses a templating system (Mason, Template Toolkit, or HTML::Template) that's great with me; if layout is done with CSS/XHTML1+, that's even better. I don't mind if the application depends on an external MySQL or PostgreSQL database, or some other storage layer (DBM, XML, text files, etc).
Most of the ones I've looked at seem okay, but not overwhelmingly so. The comment feature, which really appeals to me, doesn't seem to be available in most of the packages I've looked into. The main exception I can think of is a Movable Type based photoblog, which does well with comments but is cumbersome in other ways -- images have to be added one at a time, and as far as I can tell only the site owner can do anything with categories or other metadata.
The best photo sites I can think of are on a couple of different people's personal sites, but it isn't clear to me if the examples I've seen were custom written or if there's some great, uncredited gallery toolkit out there that these people are taking advantage of.
Here's some of what I've looked into so far:
- I've tried setting up a photoblog with Movable Type, and this is okay, but it seems like you have to add images one at a time. Additionally, the tutorials I've seen so far seem to revolve around uploading images through the browser, but I have access to put them there via scp or similar. Whether or not that's a real constraint of MT photoblogs, it still seems like the intended workflow is backwards from my point of view: select an image & offer it up for review & comment, rather than put up an array of images & allow people to comment on any they happen to find interesting. While the MT one I've tried seems okay for the occasional exceptionally good image, organizing everything this way is much more work than I have in mind here.
- I've given Apache::Gallery a try, but from the sample sites linked from http://apachegallery.dk/, none seem to be much fancier than the file browser in Nautilus or recent versions of Windows Explorer: it's still mainly a list of directories & thumbnails, with some metadata, but no categories, no comments, etc. Mason Gallery, as demonstrated at http://bushong.net/pics/ and distributed at http://bushong.net/dave/sw/, seems to have the same default qualities & limitations: prettified directories but no comments, categories, etc.
- Randal Schwartz's site at http://www.stonehenge.com/merlyn/Pictures/ looks nice (if a bit more "Star Trek: The Next Generation" than I would have gone for, but no matter :), but it doesn't seem to have categories or comment mechanism. Paul Mison's "Stem" site at http://husk.org/pics/ looks pretty nice, and seems to have the functionality I want: thumbnails, categories, and comments. However, I can't tell how automatic everything is: the thumbnails are tidily cropped squares from rectangular originals, and most (all?) of the images have the title superimposed somewhere in the image. Both of these neat features seem like they'd have to be at least partly manual to me. In any case these two sites are the property of their owners, and I don't know if either of them intends to share the underlying code.
So, of those that have photo sites, what publically available tools work well?
Thanks for any suggestions :)
MT tip (Score:2)
Of course this would be a bit hackish, but it would be nice to have the same interface for users to comment on photos as blog entries. You could always wait for MT Pro....
Photo Galleries (Score:1)
ala Textism (Score:2)
You might have a look at texism [textism.com] which is what I based my gallery on [axis-of-aevil.org]. There is a PHP thing, photostack [photostack.org], that will do it for you in PHP and much of mine is in perl although the thumbs are made manually.
album (a perl script) (Score:1)