Ref T7707. For animated GIFs, use imagemagick if it is available.
Details
- Reviewers
btrahan - Maniphest Tasks
- T7707: Implement a read-through cache layer
- Commits
- Restricted Diffusion Commit
rP200e525df122: Support imagemagick on new image transform pathway
Generated small versions of a bunch of different GIFs.
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/applications/files/transform/PhabricatorFileImageTransform.php | ||
---|---|---|
96 | I'm OK with bumping this up a bit if there's a use case for it, but generally think uploading 80MB GIFs and expecting us to process them isn't a real use case, no matter how hilarious they are, since the applications are all fun/silly (memes, funny animated avatars, etc). If there was a real use case that we were missing with weightier consequences, I'd be more open to trying harder here (but I'd probably want to look at converting to webm/mp4 first/instead). The specific problematic case is attackers uploading 512x512px solid white GIFs with 65535 frames. The on-disk size of these is a few KB; the in-memory size is like 80GB; imagemagick takes days/forever to process them while maxing CPU and eating memory. (We won't thumbnail anything bigger than 4MB now anyway so that's probably the limit most movies-in-GIF-form will hit first.) |