lib/image_optim/worker/jpegrecompress.rb in image_optim-0.22.1 vs lib/image_optim/worker/jpegrecompress.rb in image_optim-0.23.0
- old
+ new
@@ -3,9 +3,12 @@
class ImageOptim
class Worker
# https://github.com/danielgtaylor/jpeg-archive#jpeg-recompress
class Jpegrecompress < Worker
+ ALLOW_LOSSY_OPTION =
+ option(:allow_lossy, false, 'Allow worker, it is always lossy'){ |v| !!v }
+
# Initialize only if allow_lossy
def self.init(image_optim, options = {})
super if options[:allow_lossy]
end