You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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
7 years ago
..
admin Change belongs_to_required_by_default to true (#5888) 7 years ago
concerns Fix avatar and header issues by using custom geometry detector (#6515) 7 years ago
form Add option to show only local toots in timeline preview (#6292) 7 years ago
web Change user_id column non-nullable (#6435) 7 years ago
account.rb Rename ResolveRemoteAccountService to ResolveAccountService (#6327) 7 years ago
account_domain_block.rb Cache relationships in API (#6482) 7 years ago
account_filter.rb Clean up admin UI for accounts (#6004) 7 years ago
account_moderation_note.rb Lists (#5703) 8 years ago
admin.rb Add logging of admin actions (#5757) 8 years ago
application_record.rb Fix rubocop issues, introduce usage of frozen literal to improve performance 9 years ago
block.rb Cache relationships in API (#6482) 7 years ago
context.rb Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl (#4090) 8 years ago
conversation.rb Lists (#5703) 8 years ago
conversation_mute.rb Change belongs_to_required_by_default to true (#5888) 7 years ago
custom_emoji.rb Lists (#5703) 8 years ago
custom_emoji_filter.rb Add filters to admin UI for custom emojis (#6003) 7 years ago
domain_block.rb Lists (#5703) 8 years ago
email_domain_block.rb Lists (#5703) 8 years ago
export.rb Settings export refactor (#1646) 8 years ago
favourite.rb Full-text search for authorized statuses (#6423) 7 years ago
feed.rb Lists (#5703) 8 years ago
follow.rb Cache relationships in API (#6482) 7 years ago
follow_request.rb Cache relationships in API (#6482) 7 years ago
home_feed.rb Lists (#5703) 8 years ago
identity.rb CAS + SAML authentication feature (#6425) 7 years ago
import.rb Change belongs_to_required_by_default to true (#5888) 7 years ago
instance.rb Add Instance class to list admin records (#3443) 8 years ago
instance_filter.rb Add instance search feature (#4925) 8 years ago
invite.rb Change user_id column non-nullable (#6435) 7 years ago
invite_filter.rb Add invite filter (#5862) 7 years ago
list.rb Change belongs_to_required_by_default to true (#5888) 7 years ago
list_account.rb Change belongs_to_required_by_default to true (#5888) 7 years ago
list_feed.rb Lists (#5703) 8 years ago
media_attachment.rb Fix avatar and header issues by using custom geometry detector (#6515) 7 years ago
mention.rb Change belongs_to_required_by_default to true (#5888) 7 years ago
mute.rb Cache relationships in API (#6482) 7 years ago
notification.rb Clear account cache of notification target_status (#6442) 7 years ago
preview_card.rb Fix avatar and header issues by using custom geometry detector (#6515) 7 years ago
remote_follow.rb Using double splat operator (#5859) 7 years ago
remote_profile.rb Introduce OStatus::TagManager (#5008) 8 years ago
report.rb Change belongs_to_required_by_default to true (#5888) 7 years ago
report_filter.rb Admin reports with accounts (#2092) 8 years ago
search.rb Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl (#4090) 8 years ago
session_activation.rb Change belongs_to_required_by_default to true (#5888) 7 years ago
setting.rb Lists (#5703) 8 years ago
site_upload.rb Fix avatar and header issues by using custom geometry detector (#6515) 7 years ago
status.rb Push discovered status through streaming API within a time window (#6484) 7 years ago
status_pin.rb Change belongs_to_required_by_default to true (#5888) 7 years ago
stream_entry.rb Lists (#5703) 8 years ago
subscription.rb Change belongs_to_required_by_default to true (#5888) 7 years ago
tag.rb Fix account and tag searches with leading/trailing spaces (#5965) 7 years ago
user.rb Add preference to always display sensitive media (#6448) 7 years ago
web.rb Add extended about page stub 8 years ago