zulip/api_docs
Alex Vandiver 230bae17bb thumbnail: Generate a transcoded high-res version of HEIC/TIFF images.
If the content-type of the image is not in INLINE_MIME_TYPES, then we
do not expect browsers to be able to display it.  This behaviour is
particularly confusing because the thumbnail will render properly,
since that will be in the more widely-supported WebP format, but the
lightbox will show a broken image.

In these cases, generate a high-resolution (4032x3024) "thumbnail"
which clients can choose to use instead.  This thumbnail format is not
in the listed in the server's advertised thumbnail size list, because
it is not reliably generated for every image.

The transcoded thumbnail format is set on the `img` tag if it is
generated, and the original content-type is always passed to the
client, so it can decide how or if to render the original image.  This
content-type is as the _original uploader_ specified it, so may be
incorrect.

The transcoded image is not animated, even if the original was.  HEIC
files can nominally be animated, but in testing libvips was not able
to correctly recognize them as such.  TIFF files are parsed as being
"animated," with one page per frame; this is of dubious utility, so
we merely transcode the first page.  Always generating a static
transcoded image serves to also limit the computational time spent.

THUMBNAIL_OUTPUT_FORMATS is switched to be a tuple to ensure that it
is not accidentally mutated.
2025-01-09 09:10:28 -08:00
..
include users: Add API endpoint to update_user_backend by real email. 2024-10-22 16:36:38 -07:00
api-doc-template.md api-docs: Move markdown files to top level directory. 2023-02-02 17:25:40 -08:00
api-keys.md api-docs: Use start_tabs formatting and add "Related articles". 2024-02-24 08:14:32 -08:00
changelog.md thumbnail: Generate a transcoded high-res version of HEIC/TIFF images. 2025-01-09 09:10:28 -08:00
client-libraries.md docs: Update CZO links from stream to channel in docs and comments. 2024-06-11 10:44:31 -07:00
configuring-python-bindings.md api_docs: List all Python bindings configuration options. 2024-02-23 09:43:57 -08:00
construct-narrow.md fetch_messages: Add support for empty topic names. 2025-01-07 17:24:00 -08:00
create-scheduled-message.md api-docs: Update descriptive uses of "stream" for channel rename. 2024-05-20 09:31:56 -07:00
create-stream.md api-docs: Update descriptive uses of "stream" for channel rename. 2024-05-20 09:31:56 -07:00
deploying-bots.md api-docs: Add comma to all uses of "e.g." in API docs. 2024-07-05 15:36:24 -07:00
group-setting-values.md api docs: Document mentions more completely. 2025-01-07 12:14:01 -08:00
http-headers.md web: Fix links which were missing trailing slashes. 2024-01-11 13:52:12 -08:00
incoming-webhooks-overview.md api-docs: Add comma to all uses of "e.g." in API docs. 2024-07-05 15:36:24 -07:00
incoming-webhooks-walkthrough.md docs: Remove has_request_variables and REQ. 2024-09-05 16:02:12 -07:00
index.md web: Save a needless 301 redirect from /integrations to /integrations/. 2023-03-24 14:51:01 -07:00
installation-instructions.md api-docs: Use start_tabs formatting and add "Related articles". 2024-02-24 08:14:32 -08:00
integrations-overview.md help and api docs: Modernize and expand introduction to integrations. 2025-01-07 09:30:56 -08:00
message-formatting.md thumbnail: Generate a transcoded high-res version of HEIC/TIFF images. 2025-01-09 09:10:28 -08:00
missing.md api-docs: Move markdown files to top level directory. 2023-02-02 17:25:40 -08:00
non-webhook-integrations.md api-docs: Use start_tabs formatting and add "Related articles". 2024-02-24 08:14:32 -08:00
outgoing-webhooks.md typos: Fix typos caught by mwic. 2024-05-20 13:55:00 -07:00
real-time-events.md api-docs: Update descriptive uses of "stream" for channel rename. 2024-05-20 09:31:56 -07:00
rest-error-handling.md api-docs: Add comma to all uses of "e.g." in API docs. 2024-07-05 15:36:24 -07:00
rest.md api-docs: Add comma to all uses of "e.g." in API docs. 2024-07-05 15:36:24 -07:00
roles-and-permissions.md help: Adjust links and text for "/help/channels-permissions". 2025-01-07 13:41:40 -08:00
running-bots.md api-docs: Add comma to all uses of "e.g." in API docs. 2024-07-05 15:36:24 -07:00
send-message.md api-docs: Update descriptive uses of "stream" for channel rename. 2024-05-20 09:31:56 -07:00
sidebar_index.md groups: Pass old setting value for can_mention_group. 2024-05-14 12:17:15 -07:00
writing-bots.md typos: Fix typos caught by typos and mwic. 2024-12-24 19:15:36 -08:00