jpeglibjpeg-turbojpegoptimjpegtran

Resize jpeg images only where the quality >80 using either mozjpeg/jpegtran/jpegoptim


Hi I want to resize jpeg image that were uploaded as optimized, but because of a software error all recoded to 100% jpeg quality. (so we upload say 80% quality image and after upload it is 100% quality and the filesize is enormous!)

So how can I - 1st find only jpeg images file that have a quality setting > 80 or better quality setting == 100 - and optimize these images only to a quality setting = 80

I appreciate your help


Solution

  • you can use jpegoptim for compress images using command

    jpegoptim --all-progressive --strip-com --strip-exif --strip-iptc --strip-xmp -T1 -m80