I have a client and they've added some particularly large (in terms of pixel size) images to their Magento store (around 5000px x 5000px). The image is around 1MB in size.

The image does show in the admin panel on the backend and saves OK. However, when I go to the frontend it is replaced with the Magento placeholder.

I believe it's definitely to do with the size of the image, as I have uploaded a smaller image to the same product and that shows on the front.

Can anyone please suggest a remedy? I appreciate in an ideal world the client would not add such large images, and I will advise as such.

  • have you tested uploading a smaller size image and checking this displays in the front end ok?
    – Bobadevv
    Commented Jul 11, 2016 at 8:19
  • It does Bobadevv yes - so I know it's an image size issue. I wondered if there's a workaround. As you know clients can be very particular. Commented Jul 11, 2016 at 8:19

1 Answer 1


Since product images are resized on the fly during page load, my guess is that Magento runs out of memory due to large image size.

Look for something like this in templates, this is where the image resize happens:

<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->keepFrame(false)->resize($_imgSize); ?>

You could also look at Mage_Catalog_Model_Product_Image and place some logs in methods like _checkMemory, _getMemoryLimit, _getMemoryUsage and _getNeedMemoryForFile to get a better understanding of the situation.

I guess you have two options here:

  • Upload smaller images
  • Increase php memory limit

First options is probably better solution, but it depends on your theme and size of the images you output.

  • Thanks Lord Skeletor. How would I go about placing logs in there? Commented Jul 11, 2016 at 8:07

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.