I seem to have lost my images from my cart page and also the mini cart at the top of the screen. When i go into a product and add to the cart then view the mini cart (hover over cart icon) then the image is displaying perfectly with the source

<img src="http://www.domain.com/media/catalog/product/cache/1/thumbnail/50x50/4c28172cd5b58975125070293f464017/h/a/hat_101.gif" data-srcx2="http://www.domain.com/media/catalog/product/cache/1/thumbnail/100x100/4c28172cd5b58975125070293f464017/h/a/hat_101.gif" width="50" height="50">

But then when i click on the cart to view the basket the image disappear and is replaced with the magento placeholder

<img src="http://www.domain.com/media/catalog/product/cache/1/thumbnail/50x50/d2ef8acc7d0030db8e2cfcc27e37649a/images/catalog/product/placeholder/thumbnail.jpg" data-srcx2="http://www.domain.com/media/catalog/product/cache/1/thumbnail/100x100/d2ef8acc7d0030db8e2cfcc27e37649a/images/catalog/product/placeholder/thumbnail.jpg" width="50" height="50" >

The line that calls the product image says,

<td class="td-image"><img src="<?php echo $this->getProductThumbnail()->resize($imgX,$imgY); ?>" data-srcX2="<?php echo $this->getProductThumbnail()->resize($imgX*2,$imgY*2); ?>" width="<?php echo $imgX;?>" height="<?php echo $imgY;?>" alt="<?php echo $this->htmlEscape($this->getProductName()) ?>" /></td>

which if i am correct should get the product image thumbnail, resize it and display it?

Does anybody know what is going wrong here and why i am losing my image every time i refresh the page or click onto the cart page.

Thank you

  • Did you flushed the cache including the image cache?
    – mbalparda
    Dec 3, 2014 at 17:17
  • Yea i flushed the image cache, if that the problem have can i get it back? or get it to not use a cached image?
    – Adam Allen
    Dec 4, 2014 at 11:19

1 Answer 1


You can use the catalog image helper to get any type of image.

$_product = $_item->getProduct();
echo Mage::helper('catalog/image')->init($_product, 'small_image')->resize(50,50);
  • This answer will work which is why i accepted it but i found out that the reason the images wasn't appearing was because when i imported a CSV file for my products it mucked up my database. But cheers for the response anyway
    – Adam Allen
    Dec 8, 2014 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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