toy / image_optim

Optimize images using multiple utilities
https://github.com/toy/image_optim
MIT License
1.52k stars 109 forks source link

After #optimize_image! the image is rotated #185

Open brunoadacosta opened 3 years ago

brunoadacosta commented 3 years ago

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")
toy commented 3 years ago

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