Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Can I dynamically set the size of a small image


Recommended Posts

Can someone tell me where I have to modify code so that I can change the size of the space where an image will appear to be the smallest space that will contain the image?


Suppose my small image size is 80 pixels wide and 100 pixels high, and suppose that some of my images are pixel_trans.gif, the one-pixel transparent image. What I want to do is resize the image space on the screen (not the image itself) whenever the image to be displayed is pixel_trans.gif. In that case I want the screen space to be 1 by 1 rather than 80 by 100.

Link to comment
Share on other sites

I found the answer.


The change goes into catalog\includes\modules\product_listing.php.


I used


($listing['products_image'] == 'pixel_trans.gif' ? 1 : SMALL_IMAGE_WIDTH), ($listing['products_image'] == 'pixel_trans.gif' ? 1 : SMALL_IMAGE_HEIGHT)


instead of



Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...