Hi,
I would like to specify the width & height of my images in the function printDefaultSizedImage in the template-functions.php.
I am doing this because all my images are a set exact size and none of them will ever deviate from this. I am hoping that by specifying the dimensions I can avoid the jumping around of images that occur as a page of say 30 images load on an album page and the browser is unable to allocate space immediately (hope that makes some sense).
I have (i think) tracked the code down to the lines in function printDefaultSizedImage;
[code]
//Print images
else {
echo "<img src=\"" . htmlspecialchars(getDefaultSizedImage()) . "\" alt=\"" . htmlspecialchars($alt, ENT_QUOTES) . "\"" .
" width=\"" . getDefaultWidth() . "\" height=\"" . getDefaultHeight() . "\"" .
[/code]
I can get the gist of whats going on here, but i dont have the php skills to modify this. Could anyone change the above code and set width & height to say, for example 500pixels? I just don't have the syntax knowledge..!
thank you
Comments
You can set the max height in this functions and the max width in the admin image options. Originally this is meant for image.php, but should work for the album thumbs, too. Although I didn't try it.
Take a look at our new functions guide:
http://www.zenphoto.org/documentation/zenphoto/_template-functions.php.html#functionprintCustomSizedImageMaxHeight