zulip/zerver/worker
Alex Vandiver 8bd8a33dd2 thumbnail: Show the first few frames of large animated images.
71406ac767 switched the IMAGE_BOMB_TOTAL_PIXELS cutoff for what
images we preview to include the number of frames in the calculation.
While accurate to the implementation (thumbnailing a 1k-frame animation is
prohibitive, even a small resolutions), this was a behaviour change
from without thumbnailing -- animated gifs did not display inline at
all anymore.

Switch to thumbnailing as many frames as we can fit into a pixel-based
animated thumbnailing threshold, with a minimum of three (to be able
to convey that the image is actually animated).  Smaller-resolution
images will hence get more frames in their preview.  This also allows
the standard animate-on-hover or always-animate behaviour to be true
to their configurations, without confusing edge cases.

Fixes: #32609.
2025-01-15 09:56:19 -08:00
..
__init__.py Add new system for defining and running queue-processing workers 2013-09-24 20:44:15 -04:00
base.py worker: Address sentry_sdk deprecations. 2024-10-22 10:05:01 -07:00
deferred_work.py realm: Add option to schedule data deletion while deactivating. 2024-12-18 23:06:12 -08:00
digest_emails.py ruff: Fix UP035 Import from collections.abc, typing instead. 2024-07-13 22:28:22 -07:00
email_mirror.py send_email: Parse emails in a way mypy 1.14 understands. 2024-12-21 21:06:53 -08:00
email_senders.py ruff: Fix UP035 Import from collections.abc, typing instead. 2024-07-13 22:28:22 -07:00
embed_links.py embed_links: Add savepoint=False to avoid creating savepoints. 2024-11-21 14:55:15 -08:00
embedded_bots.py ruff: Fix UP035 Import from collections.abc, typing instead. 2024-07-13 22:28:22 -07:00
missedmessage_emails.py ruff: Fix PLC0206 Extracting value from dictionary without calling .items(). 2024-12-21 21:06:53 -08:00
missedmessage_mobile_notifications.py ruff: Fix PLR6104 Use += to perform an augmented assignment directly. 2024-07-14 13:49:51 -07:00
outgoing_webhooks.py ruff: Fix UP006 Use list instead of List for type annotation. 2024-07-13 22:28:22 -07:00
queue_processors.py ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
test.py ruff: Fix UP035 Import from collections.abc, typing instead. 2024-07-13 22:28:22 -07:00
thumbnail.py thumbnail: Show the first few frames of large animated images. 2025-01-15 09:56:19 -08:00
user_activity_interval.py ruff: Fix UP035 Import from collections.abc, typing instead. 2024-07-13 22:28:22 -07:00
user_activity.py ruff: Fix UP006 Use list instead of List for type annotation. 2024-07-13 22:28:22 -07:00