9
I've a CarrierWave uploader that shall accept a variety of file types. Some are image types (e.g. jpg, png) others are not.
I would like to create a medium version of the uploaded file with
version :medium do
process :resize_to_fit => [300, 300]
end
As this only works for image files, how can I distinguish between images and other types and omit the resizing for non-image files?
At the moment CarrierWave tries to process the file regardless of it's type which leads to a MiniMagick processing error if the file is not an image.