module ImageProcessing::MiniMagick

def self.valid_image?(file)

Returns whether the given image file is processable.
def self.valid_image?(file)
  convert_shim do |convert|
    convert << file.path
    convert << "null:"
  end
  true
rescue ::MiniMagick::Error
  false
end