0
0
instrumental/app
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
..
chewy Full-text search for authorized statuses (#6423) 2018-02-09 23:04:47 +01:00
controllers add parameter locked to /api/v1/update_credentials (#6506) 2018-02-18 22:57:53 +01:00
helpers Add direction tags to HTML e-mails for RTL languages (#6373) 2018-01-29 00:22:20 +01:00
javascript Fix media spoiler design (#6507) 2018-02-19 02:39:18 +01:00
lib Fix avatar and header issues by using custom geometry detector (#6515) 2018-02-21 03:40:12 +01:00
mailers Make sure status is not nil (#6428) 2018-02-04 12:31:46 +01:00
models Fix avatar and header issues by using custom geometry detector (#6515) 2018-02-21 03:40:12 +01:00
policies Allow admin to deactivate invite created by users (#5860) 2017-12-01 12:26:19 +01:00
presenters Cache relationships in API (#6482) 2018-02-18 03:14:46 +01:00
serializers Add preference to always display sensitive media (#6448) 2018-02-09 00:26:57 +01:00
services Fix #5173: Click card to embed external content (#6471) 2018-02-15 07:04:28 +01:00
validators Validation of count works even when text of status is nil (#6429) 2018-02-04 12:32:41 +01:00
views Save video metadata and improve video OpenGraph tags (#6481) 2018-02-16 07:22:20 +01:00
workers Rename ResolveRemoteAccountService to ResolveAccountService (#6327) 2018-01-22 14:25:09 +01:00