arrow-left arrow-right brightness-2 chevron-left chevron-right facebook-box facebook loader magnify menu-down rss-box star twitter-box twitter white-balance-sunny window-close
New photo layout
1 min read

New photo layout

I spent a good part of yesterday redesigning my photo page(s). I’ve been using the Gallery script for quite a while now, but I decided that I wanted to write my own PHP script to deliver the pictures. I really wanted my photo pages to validate and sit within the current site template, which I probably could have done through Gallery, but it would have taken much more time than it was worth. Another problem I had with Gallery was that it was just too big and offered more features than I needed. The PHP script that I whipped together sits within a validated XHTML template that I created and cycles through the current directory to display the thumbnails (with links to their larger pictures) for all of the pictures in that directory. If ever I create a new set of photos or want to add to a current set, I simply need to plop the pictures into the directory and point to the PHP script. It’s really kind of slick and if anyone else is interested in using it, let me know and I’ll send you the code.

I’ve also removed the original image files to reduce the amount of space that the photos take up. I’ve resized all of the files (using netPBM) to a size of 500×375 and moved the thumbnails down to a size of 50×38. The photos and their associated thumbnails used to take up around 200MB of space — they now take up ~20MB. You can find the new photo page here.

You've successfully subscribed to Justin Blanton.
Success! Your account is fully activated, you now have access to all content.