lib/image_optim/worker/optipng.rb in image_optim-0.21.0 vs lib/image_optim/worker/optipng.rb in image_optim-0.22.0
- old
+ new
@@ -35,10 +35,12 @@
-quiet
--
#{dst}
]
args.unshift "-i#{interlace ? 1 : 0}" unless interlace.nil?
- args.unshift '-strip', 'all' if strip
+ if resolve_bin!(:optipng).version >= '0.7'
+ args.unshift '-strip', 'all' if strip
+ end
execute(:optipng, *args) && optimized?(src, dst)
end
end
end
end