Open chrisgorgo opened 7 years ago
I instinctively recoil from jpg. I guess it'd be worth seeing, though.
Actually MozJPEG might be better in terms of image encoding time: https://www.pixelz.com/blog/guetzli-mozjpeg-comparison/
Apparently that's a library that drop-in replaces libjpeg, with a very limited CLI (I think it only takes JPEG as input). As a start, it would be good to verify that a lossless JPEG encoded with mozjpeg actually gets a size reduction from PNG. And then we can either try to swap out the library in Docker and save as JPEGs or save as lossless JPEGs and compress with mozjpeg using cjpeg
.
Or other thoughts?
doesn't compression increase the computational load on the browser?
https://libjpeg-turbo.org/About/Mozjpeg
the addition of [mozjpeg features] improved the compression ratio by 4-15% (average 8.3%) in our testing but increased encoding time by approximately 4-7x. Decoding time was, however, reduced by anywhere from 2-62%.
I'm taking time as a proxy for load, but seems like a reasonable trade-off.
This would allow for firefox and safari compatibility https://github.com/google/guetzli