From f3fed4ce8b7172c97e92922bfc0747d81ba33780 Mon Sep 17 00:00:00 2001 From: Toks Date: Mon, 22 Apr 2013 21:52:34 -0400 Subject: [PATCH] fixes #1236 --- app/models/upload.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models/upload.rb b/app/models/upload.rb index eb60182bb..fbfae20ef 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -191,6 +191,12 @@ class Upload < ActiveRecord::Base elsif image_width <= 500 && image_height <= 500 self.tag_string = "#{tag_string} lowres".strip end + + if image_width >= 1024 && image_width.to_f / image_height >= 3 + self.tag_string = "#{tag_string} wide_image".strip + elsif image_height >= 1024 && image_height.to_f / image_width >= 3 + self.tag_string = "#{tag_string} tall_image".strip + end end # Does this file have image dimensions?