Closed ghost closed 2 years ago
This shouldn't happen if you "optimize" a file directly on disk (instead of feeding the file to jpegoptim via STDIN)?
Sometimes (with certain command line option combinations) jpegoptim may be unable to produce smaller file than the original input file. If you are optimizing a file on disk, jpegoptim will skip the file if that happens, but when using stdin/stdout then it's left up to the calling program to check if the optimized file is indeed smaller or not....
I use php to execute a shell script:
shell_exec("jpegoptim --max=$quality --strip-all --all-progressive - < ".escapeshellarg($path_to_file));
The file gets bigger in bytes, how can I fix that? I use this image. Image