Zen Cart Logo
Forums / Basic Configuration / zen_image() and online documentation

zen_image() and online documentation

Views: 833

Results 1 to 2 of 2
26 Jul 2014, 8:26 PM
#1
jerrygarciuh avatar

jerrygarciuh

New Zenner

Join Date:
Jul 2014
Location:
New Orleans LA
Posts:
26
Plugin Contributions:
0

zen_image() and online documentation

Having read this article on image handling in the ZC docs http://www.zen-cart.com/content.php?72-my-images-are-distorted-fuzzy-squished-help I had edited my widths in Images admin to zero

However on looking at /includes/functions/html_output.php in zen_image() I see

 // use old method on template images
    if (strstr($src, 'includes/templates') or strstr($src, 'includes/languages') or PROPORTIONAL_IMAGES_STATUS == '0') {
      return zen_image_OLD($src, $alt, $width, $height, $parameters);
    }

And then in function zen_image_OLD() I see

if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {

Now the database value 0 with not cause PHP's empty() to return true.

When I re-edited my widths in the admin and saved empty values the layout works as intended.

I'd love an explanation for why the docs are like that.

Thanks.

30 Jul 2014, 10:09 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: zen_image() and online documentation

Have you some URLs to a few of the Products that do not have the images sizing correctly?

What settings are you using on Configuration ... Images ...