class ImageProcessing::Vips::Processor

def thumbnail(width, height, sharpen: SHARPEN_MASK, **options)

the resulting thumbnail.
Resizes the image according to the specified parameters, and sharpens
def thumbnail(width, height, sharpen: SHARPEN_MASK, **options)
  if self.image.is_a?(String) # path
    # resize on load
    image = ::Vips::Image.thumbnail(self.image, width, height: height, **options)
  else
    # we're already calling Image#autorot when loading the image
    no_rotate = ::Vips.at_least_libvips?(8, 8) ? { no_rotate: true } : { auto_rotate: false }
    options   = no_rotate.merge(options)
    image = self.image.thumbnail_image(width, height: height, **options)
  end
  image = image.conv(sharpen, precision: :integer) if sharpen
  image
end