Image width and hieght on max space

i am using
<img src="<?php echo getCustomSizedImageThumbMaxSpace(300,180); ?>" class="landscape" alt="Photograph of <?php echo getImageTitle(); ?>

How do i get width="" and height="" in the html
(images thumbs are the same height but always a different width.) I can see the width and height is calculated in the end html (1373642903_w223_h180_thumb.jpg) Is it possible to somehow get this into the width and height field? Any guidance much appreciated.

Comments

  • acrylian Administrator, Developer
    This assumes that the global for the current image $_zp_current_image is set:
    `
    $maxwidth = 300;
    $maxheight = 180;
    getMaxSpaceContainer($maxwidth, $maxheight, $_zp_current_image);
    $url = $_zp_current_image->getCustomImage(NULL, $maxwidth, $maxheight, NULL, NULL, NULL, NULL, NULL, NULL);
    `
Sign In or Register to comment.