You’ll find the pictures at the top of the page now change quite a bit and are linked back to the photo album. If you use WordPress (for blogging) and Picasa (for photos), it is pretty easy to set up. There are several Picasa plugins for WordPress. I’m using PicasaWeb. Here’s the code snippet I used to add it to my template:
<div id=”toppictures”>
<? picasaWeb(array(“username”=>”jaytricia”, “showRandomAlbum”=>true, “random”=>true, “num”=>5, “size”=>160));?>
</div>
That “toppictures” id has some critical attributes when applied to images. Here’s how it is defined in the stylesheet:
#toppictures img {
padding: 0;
border: 0;
margin: 0;
height:150px;
width:150px;
overflow:hidden;
}
Picasa can only feed thumbnails of a certain size, and the landscape versus portraits don’t align well. On top of that, I need the images to be exactly 150 pixels wide (times 5 images equals the 750 pixels of width I have to work with). So I start with the 160 pixel size image via PicasaWeb and then max the height and width to 150 pixels. That “overflow” attribute is critical. It says, “hide any part of the picture that exceeds the height and width”.
So with those few lines I have a random assortment of pictures, some portrait, some landscape, all cropped to 150 pixels by 150 pixels on the fly.