Removing the call to manipulate! improves Jpeg compression performance.  The writing back by rmagick of the image after the compression step caused an increase in image size:
Removing the call to manipulate! improves Jpeg compression performance.  The writing back by rmagick of the image after the compression step caused an increase in image size:

      write_block = create_info_block(options[:write])
      if options[:format]
        frames.write("#{options[:format]}:#{current_path}", &write_block)
      else
        frames.write(current_path, &write_block)
      end

It seems like PNGs are unaffected by this change based on my testing.  This only improves Jpeg.

devhyunjae/carrierwave-imageoptimizer,jtescher/carrierwave-imageoptimizer