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
gav on 2003-08-09T23:02:09
I was thinking of doing something with MT but solving the "add one at a time" problem by writing a cron job that saw new directories and used Net::Blogger to create the new entries.
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
kjones4 on 2003-08-10T05:46:58
I've gone through some similar pain recently in trying to find a decent web gallery. I haven't found what I'm looking for as of yet. However, Gallery (php based)isn't too bad, but as far as I know, you can't just dump a bunch of images in a directory. You have to do the one-at-a-time thing. Image Display System (IDS is Perl based) isn't bad, but it can be a little on the slow side. Anyways, you can look at Gallery at my site www.bolinjones.org/gallery or the homepage at gallery.sourceforge.net. IDS is available at ids.sourceforge.net. I'm currently using Gallery and it's pretty nice. Installation is quick, and you can easily do basic editing and comments. Guests can make comments and you can setup custom permissions for guests. I wasn't looking forward to the PHP stuff, but it was dead simple to install using the FreeBSD ports system. Your mileage may vary. Much of the look of the site appears to be controlled by a couple off CSS files, but there's a lot html embedded in the PHP. Oh well, I was in a rush to get something up before my recent vacation to Hawaii. Good luck and let me know if you find something better.
ala Textism
hfb on 2003-08-10T09:02:13
You might have a look at texism which is what I based my gallery on. There is a PHP thing, photostack, 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)
hatzilim on 2004-10-24T13:45:08
I ended up using album
(
http://marginalhacks.com/Hacks/album/) which is a perl script that allows a fair amount of customization. You can see my photos pages I made with it at
http://www.wisdom.weizmann.ac.il/user/jason/album.
Once you set up the preferences, then after adding new photos in a new directory, just rerun the script. All I do is add a text file to each directory with comments. It handles generating thumbnails and medium sized photos. I particularly liked how it can automatically extract the date and time the photo was taken.