image_optim icon indicating copy to clipboard operation
image_optim copied to clipboard

After #optimize_image! the image is rotated

Open brunoadacosta opened this issue 5 years ago • 1 comments

Code Example

        params = {
          pngout: false,
          advpng: false,
          jhead: false,
          jpegtran: false,
          jpegrecompress: false,
          svgo: false,
          optipng: false,
          pngquant: false,
          jpegoptim: {
            allow_lossy: true,
            max_quality: 85
          }}

        ImageOptim.new(params).optimize_image!("/tmp/image.jpg")

brunoadacosta avatar Nov 19 '20 18:11 brunoadacosta

You need to enable jhead worker, as otherwise orientation flag is removed without transforming image data.

toy avatar Nov 19 '20 23:11 toy