mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
This additional logic to prevent resizing is certain circumstances (file size, dimensions) is necessary because the pillow gif handling code seems to be rather flaky with regards to handling gif color palletes, causing broken gifs after resizing. The workaround is to only resize when absolutely necessary (e.g. because the file is larger than 128x128 or 128KB). Fixes #10351.