Magento: Get height and width of Product Image
The following functions can be used to get product’s image height and width. Image functions are defined in Mage_Catalog_Helper_Image class. getOriginalWidth gives width of image. getOriginalHeigh or getOriginalHeight gives height of image. getOriginalSizeArray gives the height and width of an image in array. $_product = $this->getProduct(); $imageWidth = $this->helper('catalog/image')->init($_product, 'image')->getOriginalWidth(); if($imageWidth > 600) { $lightboxImage … Read more