I have installed patch SUPEE-9767 on store, Now the new products images is having a black color around it. I attached a sample product image.

I have tried this fix

Watermark get black background when transparent

but the problem is after I update the new code in Validator/Image.php I cannot upload images from the admin, I can use the browse button and click Upload but after that it's just showing 'uploading' forever

Would some one advice me how to fix this issue

product image

1 Answer 1


I have encountered this bug as well. I have applied a fix to the Mage_Core_Model_File_Validator_Image class and was looking for a place to submit a bug report and patch for this.

In between lines 96 and 97, I have added this small check for PNG and GIF type images to preserve the alpha channel of the image:

if ($fileType == IMAGETYPE_GIF || $fileType == IMAGETYPE_PNG) {
    imagecolortransparent($img, imagecolorallocatealpha($img, 0, 0, 0, 127));
    imagealphablending($img, false);
    imagesavealpha($img, true);

I have tested this and can confirm it works when adding images to a product from the catalogue view. If you implement this, please let me know if it works for you as well.

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.