mastodon/app/models
Eugen Rochko a7171af0a3
Fix avatar and header issues by using custom geometry detector (#6515)
* Fix avatar and header issues by using custom geometry detector

Revert a part of #6508. The file passed to dynamic styles method
was not actually a file, but an instance of Paperclip::Attachment,
which broke all styles by always returning {} from the method.

One problem with GIF avatars was that Paperclip::GeometryDetector
reported wrong dimensions for them, e.g. 120x120 GIF avatar would
for some reason be detected as 120x53. By writing our own geometry
parser, we can use FastImage, which also happens to be faster than
ImageMagick, to detect image dimensions, which are also correct.

Unfortunately, this PR does not implement skipping a `convert`
entirely if the dimensions are already correct, as I found no easy
way to write that behaviour into Paperclip without rewriting the
Paperclip::Thumbnail class.

* Only invoke convert if dimension or format needs to be changed
2018-02-21 03:40:12 +01:00
..
admin
concerns Fix avatar and header issues by using custom geometry detector (#6515) 2018-02-21 03:40:12 +01:00
form Add option to show only local toots in timeline preview (#6292) 2018-02-04 06:00:10 +01:00
web Change user_id column non-nullable (#6435) 2018-02-07 16:35:44 +01:00
account.rb
account_domain_block.rb Cache relationships in API (#6482) 2018-02-18 03:14:46 +01:00
account_filter.rb
account_moderation_note.rb
admin.rb
application_record.rb
block.rb Cache relationships in API (#6482) 2018-02-18 03:14:46 +01:00
context.rb
conversation.rb
conversation_mute.rb
custom_emoji.rb
custom_emoji_filter.rb
domain_block.rb
email_domain_block.rb
export.rb
favourite.rb Full-text search for authorized statuses (#6423) 2018-02-09 23:04:47 +01:00
feed.rb
follow.rb Cache relationships in API (#6482) 2018-02-18 03:14:46 +01:00
follow_request.rb Cache relationships in API (#6482) 2018-02-18 03:14:46 +01:00
home_feed.rb
identity.rb CAS + SAML authentication feature (#6425) 2018-02-04 05:42:13 +01:00
import.rb
instance.rb
instance_filter.rb
invite.rb Change user_id column non-nullable (#6435) 2018-02-07 16:35:44 +01:00
invite_filter.rb
list.rb
list_account.rb
list_feed.rb
media_attachment.rb Fix avatar and header issues by using custom geometry detector (#6515) 2018-02-21 03:40:12 +01:00
mention.rb
mute.rb Cache relationships in API (#6482) 2018-02-18 03:14:46 +01:00
notification.rb Clear account cache of notification target_status (#6442) 2018-02-08 15:33:23 +01:00
preview_card.rb Fix avatar and header issues by using custom geometry detector (#6515) 2018-02-21 03:40:12 +01:00
remote_follow.rb
remote_profile.rb
report.rb
report_filter.rb
search.rb
session_activation.rb
setting.rb
site_upload.rb Fix avatar and header issues by using custom geometry detector (#6515) 2018-02-21 03:40:12 +01:00
status.rb Push discovered status through streaming API within a time window (#6484) 2018-02-17 14:28:48 +01:00
status_pin.rb
stream_entry.rb
subscription.rb
tag.rb
user.rb Add preference to always display sensitive media (#6448) 2018-02-09 00:26:57 +01:00
web.rb