From d845dd2225927579a42cc69ae60d683a7e097ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Fri, 3 Apr 2015 11:22:48 +0200 Subject: [PATCH] FIX: actually optimize the image! --- app/models/optimized_image.rb | 2 +- lib/letter_avatar.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/optimized_image.rb b/app/models/optimized_image.rb index 6fdc3869e..b55622995 100644 --- a/app/models/optimized_image.rb +++ b/app/models/optimized_image.rb @@ -153,7 +153,7 @@ class OptimizedImage < ActiveRecord::Base return false if $?.exitstatus != 0 - ImageOptim.new.optimize_image(to) rescue nil + ImageOptim.new.optimize_image!(to) rescue nil true end diff --git a/lib/letter_avatar.rb b/lib/letter_avatar.rb index ecb031727..48d333f4e 100644 --- a/lib/letter_avatar.rb +++ b/lib/letter_avatar.rb @@ -78,7 +78,7 @@ class LetterAvatar `convert #{instructions.join(" ")}` - ImageOptim.new.optimize_image(filename) rescue nil + ImageOptim.new.optimize_image!(filename) rescue nil filename end