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