Closed jackyhallyday closed 2 years ago
This has now been implemented with commit (05c3f85aa1330f88f20b86c9d535a72735ed33a1). Can you test if behavior is now as expected?
This should also fix --size option that was not working when input was read from stdin....
I'm super late but yes, it works! 👍 Thank you
Hello,
Would it be possible to force JPEGOptim to output the original file if it hasn't been able to reduce its size?
The problem I've got is when I insert JPEGOptim in my workflow : I'm using JPEGTran, then JPEGOptim using --stdin, then output the result to a file using --stdout and a >.
When a file has not been optimized, JPEGOptim outputs a message saying that the file has been skipped. It's possible to force the output, but in that case, the output is the biggest file.
So it seems that the current options we have if JPEGOptim fails to optimize the files are: original_file.jpg > JPEGOptim > "skip message" original_file.jpg > JPEGOptim > bigger_file.jpg
It would be nice to have an option like --force-smallest or something: original_file.jpg > JPEGOptim > copy_of_original_file.jpg
That way, JPEGOptim could be chained to other commands and always output the smallest file it can.