i have tried a lot to get only small image from product collection of product object to create custom XML feed for my products.

but could not able to get succeed yet.

  $imgname = Mage::helper('catalog/image')->init($product, 'small_image',$product->getSmallImage())->resize(200, 115);       

But Result is


And my collection is

$collection = Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('*')
                       'status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED)

it would be great if some one point me in right direction.

  • as tried lot of small image using helper funtion.It protected prevent the create small image.. for memory limit
    – Amit Bera
    Apr 8 '15 at 4:50
  • is there any other which we can grab this ?
    – liyakat
    Apr 8 '15 at 5:04
  • no.only solution to create resize image of small_image using varien_image
    – Amit Bera
    Apr 8 '15 at 5:20
  • shall we get small_image from base image url if we have ? without load product object.
    – liyakat
    Apr 8 '15 at 5:25
  • no. base image will be occur.... Issue with resize image. you can small image directly using below getSmallImageUrl()
    – Amit Bera
    Apr 8 '15 at 5:28

Try to use catalog output helper

$_helper = $this->helper('catalog/output');
$imgname = $_helper->init($product,
'small_image',$product->getSmallImage())->resize(200, 115);
  • You may wanted to refer to catalog/image helper, as there's no init method in catalog/output helper. Mar 25 '20 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.