Member
Member
lainyrache   2013-07-22, 10:28
#1
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.
Administrator
Administrator
acrylian   2013-07-22, 12:42
#2
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);
`
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.