4

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? Commented Jun 17, 2019 at 21:29
  • Are you using ImageMagick or GD? If you're uncertain, it's probably GD (which is worse).
    – Lindsey D
    Commented Jun 17, 2019 at 21:30
  • 1
    @AugustMiller That's not accurate... Craft will "clean" any uploaded images.
    – Lindsey D
    Commented Jun 17, 2019 at 21:30
  • @AugustMiller No image transforms are being used. I am viewing the image on my local site.
    – Lara Hilal
    Commented Jun 17, 2019 at 21:33
  • @LindseyD Would it help if I used ImageMagick? Do you think it's related?
    – Lara Hilal
    Commented Jun 17, 2019 at 21:34

1 Answer 1

4

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
  • 1
    @LindsayD Thank you, defaulting to ImageMagick fixed the problem!
    – Lara Hilal
    Commented Jun 20, 2019 at 15:57

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.