about summary refs log tree commit diff
path: root/lib/paperclip
AgeCommit message (Collapse)Author
2019-04-27Add blurhash (#10630)Eugen Rochko
* Add blurhash * Use fallback color for spoiler when blurhash missing * Federate the blurhash and accept it as long as it's at most 5x5 * Display unknown media attachments as blurhash placeholders * Improve style of embed actions and spoiler button * Change blurhash resolution from 3x3 to 4x4 * Improve dependency definitions * Fix code style issues
2018-09-17Unconditionally re-encode locally-uploaded images to strip metadata (#8714)ThibG
This strips metadata on file upload by re-encoding the files, at the cost of possible slight image quality decrease and processing resources.
2018-07-28Resize images by area instead of fixed dimensions (#8083)Eugen Rochko
To improve the way super tall or super ride images are treated, the numbers remain the same, 1280x1280 and 400x400, but if an image is less in one dimension than the other, the other can become larger Thanks to @WAHa_06x36@mastodon.social for the tip
2018-07-14Fix static GIFs being saved as empty files when using local storage (#8012)Eugen Rochko
Fix #7997 Fix #6237
2018-03-06Fix #3807: Increase avatars to 400x400 max (#6651)Eugen Rochko
But do not upscale when they are smaller
2018-02-22Fix #6525: Make sure file is opened in LazyThumbnail processor (#6529)Eugen Rochko
2018-02-21Account archive download (#6460)Eugen Rochko
* Fix #201: Account archive download * Export actor and private key in the archive * Optimize BackupService - Add conversation to cached associations of status, because somehow it was forgotten and is source of N+1 queries - Explicitly call GC between batches of records being fetched (Model class allocations are the worst offender) - Stream media files into the tar in 1MB chunks (Do not allocate media file (up to 8MB) as string into memory) - Use #bytesize instead of #size to calculate file size for JSON (Fix FileOverflow error) - Segment media into subfolders by status ID because apparently GIF-to-MP4 media are all named "media.mp4" for some reason * Keep uniquely generated filename in Paperclip::GifTranscoder * Ensure dumped files do not overwrite each other by maintaing directory partitions * Give tar archives a good name * Add scheduler to remove week-old backups * Fix code style issue
2018-02-21Fix avatar and header issues by using custom geometry detector (#6515)Eugen Rochko
* 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
2017-10-26Fix Cocaine::ExitStatusError when upload small non-animated GIF (#5489)unarist
Looks like copied tempfile need to be flushed before further processing. This issue won't happen if the uploaded file has enough file size.
2017-04-19Fix #2108 - Fix gif uploads (#2171)Eugen
* Fix #2108 - Fix gif uploads Add specs for media attachment gifv conversion * Add ffmpeg to travis * Make travis install ffmpeg, not libav * Switch travis to trusty
2017-03-06Use more widely supported MP4 format for gifv'sEugen Rochko
2017-03-05Detect videos with no sound, handle them like gifvEugen Rochko
2017-03-04Fix #431 - convert gif to webm during upload. Web UI treats them like it didEugen Rochko
before. In the API, attachments now can be either image, video or gifv. Gifv is to be treated like images in terms of behaviour, but are videos by file type.