Module: ReencodeImages

Extended by:
ActiveSupport::Concern
Includes:
CarrierWave::MiniMagick
Defined in:
app/uploaders/reencode_images.rb

Instance Method Summary collapse

Instance Method Details

#reencodeObject



12
13
14
15
16
17
18
19
20
# File 'app/uploaders/reencode_images.rb', line 12

def reencode
  unless file.content_type == 'application/pdf'
    manipulate! do |img|
      img.strip
      img.format(img.type)
      img
    end
  end
end