Repository navigation
Description
Summary
A PNG that is still over 2 MiB after the chat composer has compressed it never reaches the model, and nothing tells the sender. The model is given the text [attachment: <name>] instead of the picture and answers that it cannot read the image. The message sends normally, the attachment chip looks like any other, and the only trace is a server log line.
Found on 2026-11-06 while re-testing a customer acceptance list against the preview (v0.5.101), whose PNG finding reads "an error is thrown when PNG is processed". It is not known whether that customer's file hits this; the PNG itself was not available.
Reproduction (preview, v0.5.101, Auto model, one image per new chat)
Prompt: "Which code is in the image? Answer with the code only." Every image shows the same black text CODE ZEBRA-4711 on a clean white box.
| Image | Size on disk | Result |
|---|---|---|
| 2400 × 1600, plain grey background | 36 KB | ZEBRA-4711 |
| 3000 × 3000, text box clean, a noisy strip below | 3.7 MB | ZEBRA-4711 |
| 1700 × 1100, noisy background | 3.3 MB | "Ich kann das Bild hier nicht auslesen." |
| 2400 × 1600, noisy background | 7.8 MB | "Ich kann den Bildinhalt hier nicht erkennen." |
| 3000 × 3000, text box clean, a larger noisy strip | 9.3 MB | "Ich kann das Bild hier nicht auslesen." |
The text is equally legible in all five, so the picture's content is not the cause. Noise stands in for what a scan, a photo or a detailed screenshot does to a PNG: it does not shrink.
What the repository says today
Observed at ee243d4f5 (v0.5.100 plus 18 commits); the preview behaves the same.
- Composer:
compressImage(services/platform/lib/utils/compress-image.ts) aims at 1 MB (MAX_IMAGE_SIZE, line 7) but only caps the longer side at 2048 px (line 9) and re-encodes once. A PNG stays a PNG, "to keep transparency" (lines 117-119), and a canvas PNG has no quality setting. It never checks the result against the 1 MB aim, so a detailed PNG leaves the composer at several MB. - Server:
loadWireImage(services/platform/backend/core/chat/turn_action.ts:491-518) refuses any image overINLINE_IMAGE_MAX_BYTES, 2 MiB (line 474). It logsconsole.warnand returnsnull.settleWireAttachments(line 530) then appends[attachment: <name>]to the message in its place. - Nothing reaches the sender. No toast on attach, no note on the chip, no hint in the reply. The model has only the placeholder, so it says it cannot read the image; it cannot say why.
- JPEG is not affected in practice: it is re-encoded at quality 0.85 and rarely stays over 2 MiB at 2048 px.
Not examined: whether other paths send images over the bound (REST turns, tasks, the harness bridge).
Options (no preference)
- Make the composer keep its promise: if the result is still over the bound, re-encode as JPEG when the image has no transparency, or step the dimensions down until it fits.
- Do the same on the server in
loadWireImage, so an image from any path fits instead of falling back to its text surface. - Keep the fallback, but say so: refuse or warn at attach time ("this image is too large for the model to see"), and tell the model that the picture was left out, not only that a file exists.
Options 1 and 3 can go together.
Questions
- Is 2 MiB the right bound for the providers Tale supports, or only a safe one? Some providers accept 5 MB or more per image.
Related
- Epic: pilot findings, October 2026 — files and images in chat, skills, web reading, permissions #5044 (pilot findings: files and images in chat)
Activity
fix(platform): fit a large picture under what a model is shown
yannickmonney commentedon Nov 6, 2026
Fixed by
882564b0b(fix(platform): fit a large picture under what a model is shown) on the merge train #5408, for v0.5.102. It combines options 1 and 3.CHAT_IMAGE_MODEL_MAX_SIZE, which the server reads too. A picture without transparency becomes a JPEG; one with transparency stays a PNG at smaller sizes first.[attachment: x.gif — not sent to you: the image is 2.40 MB, over the 2 MB limit for one image].image/pngorimage/webp. The upload now carries the bytes' type, and the model wire labels each image by its bytes.On the open question: the bound stays at 2 MiB.
Not examined, the issue's other question: REST sends carry no images, and task agents read attachments as files. The composer is therefore the one path that puts images into a model request.
Checked in a real browser with a stand-in vision model that reports what it receives: