FIX: call ImageSizer only if width/height are available

This commit is contained in:
Penar Musaraj 2018-11-29 15:03:02 -05:00
parent 40f10855c6
commit 140d9c2910
1 changed files with 3 additions and 1 deletions

View File

@ -128,7 +128,9 @@ class Upload < ActiveRecord::Base
end
self.width, self.height = size = FastImage.new(path).size
self.thumbnail_width, self.thumbnail_height = ImageSizer.resize(*size)
if !size.blank?
self.thumbnail_width, self.thumbnail_height = ImageSizer.resize(*size)
end
nil
end