In June, Dmitry posted a very simple photo album on his blog. I immediately liked it because it's both easy to set-up (just drop the ashx file into your web site's photo directory) and to manage (no need to upload images one by one using a clumsy web upload field, just upload new photos using ftp or the file system). It's also nice to browse. Sure, there are no fancy ratings or comments features, you can't add titles or descriptions, but frankly, I didn't need all these features.
Still, I wanted to change a few things so I went ahead and added the following to Dmitry's handler:
- XHTML output
- CSS styling
- EXIF meta-data reading and displaying
- Sorting by date shot
- Stacked photos folder icons (uses default.jpg if it exists)
- Folder names respect casing and special characters
- In-handler pseudo-config (just modify the handler's configuration block with any text editor)
- Thumbnail caching on disk or in memory
The handler is under a shared source licence, which means that you can do pretty much what you want with it. It uses the Metadata public domain library by Drew Noakes and adapted for .NET by Renaud Ferret to extract the EXIF information from the jpeg files. This library can be downloaded from http://renaud91.free.fr/MetaDataExtractor. Please use the dll from the workspace below, though, as I've made a small correction. I've also sent the correction to Renaud, but he may not publish a new version immediately...
Download the code for the handler here:
Special thanks should go to Dmitry Robsman and David Ebbo.
UPDATE: the handler is now hosted on Codeplex.