3

After I upload an asset (png), the image loses quality. I changed the defaultImageQuality from its default value of 82 to 100 but didn't make a difference. I can't add these assets via FTP as I need users to be able to add them from the admin panel. Any advises?

6
  • The original assets should not be modified by Craft, at any point (unless an installed + active plugin is making changes)—can you confirm where you're viewing the image, and that an Asset Transform isn't being applied that would covert the image to a JPG when displaying it? – August Miller Jun 17 '19 at 21:29
  • Are you using ImageMagick or GD? If you're uncertain, it's probably GD (which is worse). – Lindsey D Jun 17 '19 at 21:30
  • 1
    @AugustMiller That's not accurate... Craft will "clean" any uploaded images. – Lindsey D Jun 17 '19 at 21:30
  • @AugustMiller No image transforms are being used. I am viewing the image on my local site. – Lara Hilal Jun 17 '19 at 21:33
  • @LindseyD Would it help if I used ImageMagick? Do you think it's related? – Lara Hilal Jun 17 '19 at 21:34
3

Converting my comment(s) into an answer...

Make sure you are using the ImageMagick library to handle image manipulation (instead of the default GD library). It provides much better results.

Craft will "clean" every image that gets uploaded. This prevents anyone from accidentally (or intentionally) uploading malicious scripts to your site hidden within an image file.

1
  • @LindsayD Thank you, defaulting to ImageMagick fixed the problem! – Lara Hilal Jun 20 '19 at 15:57

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.