about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-12-07 12:09:20 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-12-07 12:09:20 +0100
commit06dd359239f3f75a46af301f6b0f61f9087d266d (patch)
tree4cabfa8ddcde14be9edbfb12bd31dfbd010c3460
parentbf5f8a2449fa10f93ecc7386d9fff21738dd0466 (diff)
Downsize attachment previews, but improve quality from 80 to 90
-rw-r--r--app/models/media_attachment.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/media_attachment.rb b/app/models/media_attachment.rb
index 7214ab880..a97fe89a5 100644
--- a/app/models/media_attachment.rb
+++ b/app/models/media_attachment.rb
@@ -10,7 +10,7 @@ class MediaAttachment < ApplicationRecord
   has_attached_file :file,
                     styles: -> (f) { file_styles f },
                     processors: -> (f) { f.video? ? [:transcoder] : [:thumbnail] },
-                    convert_options: { all: '-quality 80 -strip' }
+                    convert_options: { all: '-quality 90 -strip' }
   validates_attachment_content_type :file, content_type: IMAGE_MIME_TYPES + VIDEO_MIME_TYPES
   validates_attachment_size :file, less_than: 4.megabytes
 
@@ -45,14 +45,14 @@ class MediaAttachment < ApplicationRecord
       if f.instance.image?
         {
           original: '1280x1280>',
-          small: '510x680>',
+          small: '250x250>',
         }
       else
         {
           small: {
             convert_options: {
               output: {
-                vf: 'scale=\'min(510\, iw):min(680\, ih)\':force_original_aspect_ratio=decrease',
+                vf: 'scale=\'min(250\, iw):min(250\, ih)\':force_original_aspect_ratio=decrease',
               },
             },
             format: 'png',