yoga
yoga copied to clipboard
JPEG → JPEG optimization: keep the original image if the output image is bigger than the input one
When doing a JPEG to JPEG optimization, we should never have an output image bigger than the input one.
- If the guetzli+mozjpeg reencoding produce a smaller image → keep it
- else, try a mozjpeg (lossless) optimization alone, and if it produces a smaller image → keep this one
- else, just remove metadata and keep the original encoding.
Issue #43 must be resolved before this one
Related issue: https://github.com/flozz/yoga-image-optimizer/issues/14