Programmatically get the width and height of a product image in Magento?
问题 Inside Magento templating code I want to get the width and height of the original product image (uploaded by admin when creating product), so as to make according adjustments. How can I do this? Thus far I have: $this->helper('catalog/image')->init($_product, 'image') Does this have any methods that would allow me to retrieve the original dimensions of the product image? Such as: $this->helper('catalog/image')->init($_product, 'image')->getWidth() Or something? Thanks! 回答1: Just found it in