Engine23
blogBannerImage
By Engine23

How to get Product image url from product id or SKU?

(string)Mage::helper('catalog/image')->init($_product$image)->resize($size)

 

Example 1:

(string)Mage::helper('catalog/image')->init($_product'back_image')->resize(300)

 

Example 2:

(string)Mage::helper('catalog/image')->init($_product'image')->resize(250)

 

or

Example 3 (origional image without resize):

$_product->getMediaConfig()->getMediaUrl($_product->getData('image'))