Home    Articles

 

Issue on product page, placeholder image is used instead product image in magento

 

If the catalog view page is showing the correct images for the products, but the product view page is showing the placeholder image you have to check the memory_limit setting in php.ini.

Magento performs a memory check in order to test if there is enough memory to load that image.

If there is no memory left, the placeholder image is used.

To test if this is the real problem, upload a smaller image for the product.Then refresh.

The file that checks for memory_limit is magento\app\code\core\Mage\Catalog\Model\Product\Image.php

Line 275 ( Magento 1.8 )

  if ($file) {
    if ((!$this->_fileExists($baseDir . $file)) || !$this->_checkMemory($baseDir . $file)) {
         $file = null;
    }
}

Do not remove this code, this can cause more problems, your website will not work properly.

Increase your memory_limit to at least 64M

by