module ImageProcessing::Vips

def self.valid_image?(file)

def self.valid_image?(file)
  ::Vips::Image.new_from_file(file.path, access: :sequential, fail: true).avg
  true
rescue ::Vips::Error
  false
end