I\'m running on version 1.3.2.1, but on my client\'s server they had Magento 1.3.0 so my previous code to display images for my local copy,
echo $this->he
echo $_product->getImageUrl();
This method of the Product class should do the trick for you.
If you have the product collection object like:
$collection = Mage::getModel('catalog/product')->getCollection();
Now you can get product sku using $_product->getSku()
if you can't get image path with
echo $this->helper('catalog/image')->init($_product,'small_image')->resize(135);
Or
$_product->getImageUrl();
Then you can add a little code
$productModel = Mage::getModel('catalog/product');
$_prod = $productModel->loadByAttribute('sku', $_product->getSku());
$_prod->getImageUrl();
I recently needed to do this as well... here's how I got to it:
$_product->getMediaGalleryImages()->getItemByColumnValue('label', 'LABEL_NAME')->getUrl();
Hope that helps you!
First You need to verify the base, small and thumbnail image are selected in Magento admin.
admin->catalog->manage product->product->image
Then select your image roles(base,small,thumbnail)
Then you call the image using
echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(163, 100);
Hope this helps you.
(string)Mage::helper('catalog/image')->init($product, 'image');
this will give you image url, even if image hosted on CDN.
<img src='.$this->helper('catalog/image')->init($product, 'small_image')->resize(225, 225).' width=\'225\' height=\'225\'/>