i am using the image cropping of CB. I really like this feature. But almost every second project/client is complaining about the quality of the images created by the cropping. For example i have an image with 100KB in perfect quality i crop it to the same or any other size and get an image with less quality and an increase of file size.
I know that this is probably the problem of the php library. But is there any way of using something else? I was thinking of coding something to use the service of imageOptim or something. They have really amazing results and the clients love the quality and google the file size.
Is it possible to hook some kind of a plugin to the image-cropping of CB? Any hints where i could start?
If you’re not already using imagick, that would be a good first step to get sorted.
There are also two settings (contentblocks.crop_jpeg_quality, contentblocks.crop_png_compression) but those are set pretty high by default.
Your ImageOptimOnUpload extra could be made to also run on crops by extending it to also respond to OnFileManagerFileCreate and OnFileManagerFileUpdate events, but beyond optimizing the filesize that can’t magically make extra pixels appear if they were removed by the cropping…