compression on Magento 2.x is very strong, so that the quality of product images get really bad in Catalog and Product view.

How can i disable or stop product image compression ? currently, Magento 2 have 2 type composition (PGP GD2 & ImageMagick). I want to disable both types.

enter image description here

1 Answer 1


Look in files Magento/Catalog/Model/Product/Image.php property $_quality (default is 80%) and Magento/Framework/Image/Adapter/Gd2.php lines from 165-176 (for .PNG files compression is set to maximum)

These two places are responsible for images quality.

  • 1
    Yes, That i know and try it, but it's not getting a proper result. I want to disable permanently. Didi you know in which file compression code available??
    – Dhrumin
    Dec 14, 2018 at 6:24

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.