Is there a way / plugin to help the image resizer with png compression?
I have a png image that I use in navigation and would like to keep it as small as possible. The original image has width 200px and size 38kb. I need to resize it down to 150px. Once I do so using the image resizer the size goes up to 150kb.
Originally the image was compressed using http://tinypng.org/
Yes, the PrettyGifs plugin offers excellent octree quantization for both PNG and GIF images.
Use
&colors=256
,&colors=128
, etc to adjust the bit depth. You can also preserve the existing color palette withpreservePalette=true
.Note that advanced PNG compression optimizations (such as offered by smush.it, tinypng, etc) require an additional 150-400MB of RAM and take 10-20 seconds to perform - for obvious reasons you wouldn't want that to happen during a dynamic request. ImageResizer tries to finish each request under 250ms.
Hand-optimizing PNG/GIF CSS sprites and site-wide icons is usually going to give you a smaller file size that ImageResizer can, although it's nearly impossible to beat for photographic data.
Of course, with the WebP plugin installed, ImageResizer will wipe the floor with the competition.