After images have been processed, you might want to additionally optimize them to reduce their filesize. The image_optim gem does this:
require "image_optim" thumbnail = ImageProcessing::Vips .resize_to_limit(400, 400) .saver(quality: 85) .call(image) image_optim = ImageOptim.new(...) image_optim.optimize_image!(thumbnail.path) thumbnail.open # refresh file descriptor thumbnail # optimized thumbnail
There was an error while loading. Please reload this page.