4

I installed patch 8788 on my Magento shop, but now i get the error "Disalollowed file format." (I think they mean "Disallowed file format.") when i want to upload an image in at my products.

How is this possible and how to solve it?

Yaroslav Rogoza
  • 1,792
  • 12
  • 19
Kees Janssen
  • 135
  • 3
  • 15

2 Answers2

7

The SUPEE-8788 patch introduced maximum image dimensions in the configuration.

You get that error (indeed mispelled) from Mage_Catalog_Helper_Image:

public function validateUploadFile($filePath) {
    $maxDimension = Mage::getStoreConfig(self::XML_NODE_PRODUCT_MAX_DIMENSION);
    $imageInfo = getimagesize($filePath);
    if (!$imageInfo) {
        Mage::throwException($this->__('Disallowed file type.'));
    }

    if ($imageInfo[0] > $maxDimension || $imageInfo[1] > $maxDimension) {
        Mage::throwException($this->__('Disalollowed file format.'));
    }

    $_processor = new Varien_Image($filePath);
    return $_processor->getMimeType() !== null;
}

By default, the maximum image dimensions is 5000px so I reckon your image upload is bigger than this.

You can change the configuration under System > Configuration > Catalog > Product Image > Maximum resolution for upload image

Raphael at Digital Pianism
  • 70,385
  • 34
  • 188
  • 352
2

Under System > Configuration > Catalog > Product Image
I had to change Maximum resolution for upload image to 1200px.
Then on Product > Images I got Maximum width and height dimension for upload image is 1200. Now I was able to add images. For me looks like a bug.

Nico
  • 21
  • 1