How to get full product image url in Magento

After you loaded your product using load() you can use the following in your code:

Full size image:

$imageUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $product->getImage();

Resized/Cached image:

$imageCacheUrl = Mage::helper('catalog/image')->init($product, 'image')->resize(135, 135);

If you need a different cache size, then use other numbers for the resize method.


You can try below code first of all call helper of catalog

echo  Mage::helper('catalog/image')->init($product, 'thumbnail');

From this code you can get cache path also.


Try this

$product = Mage::getModel('catalog/product')->load($product_id);
$full_path_url = Mage::helper('catalog/image')->init($product, 'thumbnail');

Tags:

Magento