Front Page Image

One of the things we wanted with the current redesign was to have a simpler homepage – less busy, without the mass of posts and links. We also wanted to get a decent sized photo up there as soon as people arrive.

I was inspired somewhat by Inspiredology’s post on sites with large photo backgrounds. We haven’t gone that far, but the photo is the biggest element on the page.

I wanted to rotate images randomly, though, so people could see different ones, and a range of images would show up on different visits.

Showing a random image with PHP is something I’ve coded myself before, but I figured it would be easier to Google for one than either write from scratch, or even try to dig out an old one I’d written before. The first one I found takes a different approach that I wouldn’t have thought of, and was easier to implement than what I was going to do – Matt Mullenweg’s Random Image Script. Matt is the guy behind WordPress, so he probably knows what he’s doing ;)