title: Optimize image using mini-magick and carrierwave in rails
body: <p>I am using <code>carrierwave</code> for uploading image. Now I want to optimize images also. Like if user upload image of any size , I want to optimize that image in less 200kb size.</p>
  
  <p>For that I add <code>mini-magick</code> gem.
  Here is my code</p>
  
  <pre><code>version :listing_main do
    image = ::MiniMagick::Image::read(File.binread(@file.file))
    // Want to compress image here      
    resize_to_fill 800,600
  end
  </code></pre>
  
  <p>Issue is that how I can compress image , not find any way and tutorial for that</p>