Thanks, SpankMarvin – that worked!
Digital Raindrops- If your thumbnail setting preserves image ratio to a fixed height, eg: height=200 and width=9999, you won’t know the width.
My dear graphic designer friend, who knows just enough about WordPress to be dangerous, gave me a spec for an artist gallery web site “the short side of images should be 100px, preserving the image ratio, with 20px padding between the thumbnails…”. From a design point of view she’s correct. If you use only one thumbnail setting than either your landcape or portrait images will be resized smaller than the others. The she wanted them bottom aligned in the rows rather then the default top alignment. I defined a few different thumbnail sizes, then wrote a function to find whether they are portrait or landscape:
`function is_portrait($image_url){
$isize=(getimagesize($image_url));
//array 0 is height, 1 is width
if ($isize[0] >=$isize[1]){return true; }
else{return false;}
}’
I modified the gallery shortcode to set the size according to portait or landscape size.
I was able to bottom align the thumbs using absoute positioning in the child element, but without specifying a width they all landed on top of each other. Setting the width of the container at the element level fixed this. The site isn’t live yet or I’d post a link.