A platform for community discussion. Free, open, simple.
FIX: call ImageSizer only if width/height are available
Penar Musaraj140d9c2910fd
diff --git a/app/models/upload.rb b/app/models/upload.rbindex bf3d4155154..802be437e74 100644--- a/app/models/upload.rb+++ b/app/models/upload.rb@@ -128,7 +128,9 @@ class Upload < ActiveRecord::Baseendself.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)+ endnilend