diff --git a/lib/image_optim/image_path.rb b/lib/image_optim/image_path.rb index 92e0b02b..8bda7ad1 100644 --- a/lib/image_optim/image_path.rb +++ b/lib/image_optim/image_path.rb @@ -43,6 +43,7 @@ def replace(src) src.copy(temp) temp.write(read) temp.rename(src.to_s) + unlink end end