3

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?

6

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

  • 2
    @KeesJanssen feel free to mark your question as accepted so it will benefit for the community ;) – Raphael at Digital Pianism Oct 25 '16 at 12:09
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.

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.