FEATURE: introduce lossy color optimization on resized pngs

This feature ensures optimized images run via pngquant, this results extreme amounts of savings for resized images. Effectively the only impact is that the color palette on small resized images is reduced to 256.

To ensure safety we only apply this optimisation to images smaller than 500k.

This commit also makes a bunch of image specs less fragile.
This commit is contained in:
Sam
2019-01-02 17:19:52 +11:00
parent 2914431729
commit 766e67ce57
5 changed files with 45 additions and 14 deletions

BIN
spec/fixtures/images/pngquant.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB