Matrix: media is always fetched at full size #227

Closed
opened 2026-09-13 11:59:39 -04:00 by Salastil · 1 comment
Owner

The content repository is used for upload and authenticated download only. /thumbnail is never called, and /config - which is how a client learns the server's upload size limit - is never read.

So a picture in a busy room is fetched whole to be drawn small, and a file that is too big to upload is discovered by the upload failing rather than before it starts.

The content repository is used for upload and authenticated download only. `/thumbnail` is never called, and `/config` - which is how a client learns the server's upload size limit - is never read. So a picture in a busy room is fetched whole to be drawn small, and a file that is too big to upload is discovered by the upload failing rather than before it starts.
Salastil added the featurelow priority labels 2026-09-13 11:59:39 -04:00
Author
Owner

Finished.

A media event's own thumbnail_url is still preferred — the sender made it and it costs nothing. Where there is none, the server is asked to make one, but only for a picture big enough that a second request saves more than it costs: a small image fetched whole is one round trip, and the same image fetched twice is two. scale rather than crop, because a timeline picture is the whole picture.

Never in an encrypted room, where the server holds ciphertext and cannot resize what it cannot read — which is why a client-made thumbnail is the only kind those ever have.

The upload limit joins the other things the server says about itself at connect, and an attachment is measured against it before the upload starts. A server that declines to state one refuses nothing: the spec allows silence, and a client that blocked every upload because it could not read a number would be worse than one that never asked. poast's is 15 GiB.

873a908, 8febda2

Finished. A media event's own `thumbnail_url` is still preferred — the sender made it and it costs nothing. Where there is none, the server is asked to make one, but only for a picture big enough that a second request saves more than it costs: a small image fetched whole is one round trip, and the same image fetched twice is two. `scale` rather than `crop`, because a timeline picture is the whole picture. **Never in an encrypted room**, where the server holds ciphertext and cannot resize what it cannot read — which is why a client-made thumbnail is the only kind those ever have. The upload limit joins the other things the server says about itself at connect, and an attachment is measured against it before the upload starts. A server that declines to state one refuses nothing: the spec allows silence, and a client that blocked every upload because it could not read a number would be worse than one that never asked. poast's is 15 GiB. [873a908](https://git.salastil.com/Salastil/nobilis/commit/873a908), [8febda2](https://git.salastil.com/Salastil/moho/commit/8febda2)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Salastil/moho#227