]> cat aescling's git repositories - mastodon.git/commitdiff
Increase max height of preview card image (#5092)
authorunarist <m.unarist@gmail.com>
Mon, 25 Sep 2017 15:10:49 +0000 (00:10 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 25 Sep 2017 15:10:49 +0000 (17:10 +0200)
We added horizontal layout to preview card for wide image. However, max height of the thumbnail is still limited to 120px and it makes nearly square images to too small for that layout.

This PR increases max height as well as max width.

app/models/preview_card.rb

index b7efac354a64fd26f4fae9cc8637bb2c50f7c5ca..e2bf65d94776659e5af4c81c03ef4befe26ab45a 100644 (file)
@@ -32,7 +32,7 @@ class PreviewCard < ApplicationRecord
 
   has_and_belongs_to_many :statuses
 
-  has_attached_file :image, styles: { original: '280x120>' }, convert_options: { all: '-quality 80 -strip' }
+  has_attached_file :image, styles: { original: '280x280>' }, convert_options: { all: '-quality 80 -strip' }
 
   include Attachmentable
   include Remotable