Download a thumbnail of content from the content repository
Download a thumbnail of content from the content repository. See the Thumbnails section for more information.
NOTE: Clients SHOULD NOT generate or use URLs which supply the access token in the query string. These URLs may be copied by users verbatim and provided in a chat message to another user, disclosing the sender's access token.
Clients MAY be redirected using the 307/308 responses below to download the request object. This is typical when the homeserver uses a Content Delivery Network (CDN).
Request
- Base URLhttps://matrix.org
- Auth
- API key in query parameter access_token
- or HTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The server name from the mxc:// URI (the authority component).
The media ID from the mxc:// URI (the path component).
Query parameters
The desired width of the thumbnail. The actual thumbnail may be larger than the size specified.
The desired height of the thumbnail. The actual thumbnail may be larger than the size specified.
The desired resizing method. See the Thumbnails section for more information.
The maximum number of milliseconds that the client is willing to wait to start receiving data, in the case that the content has not yet been uploaded. The default value is 20000 (20 seconds). The content repository SHOULD impose a maximum value for this parameter. The content repository MAY respond before the timeout.
Indicates preference for an animated thumbnail from the server, if possible. Animated thumbnails typically use the content types image/gif, image/png (with APNG format), image/apng, and image/webp instead of the common static image/png or image/jpeg content types.
When true, the server SHOULD return an animated thumbnail if possible and supported. When false, the server MUST NOT return an animated thumbnail. For example, returning a static image/png or image/jpeg thumbnail. When not provided, the server SHOULD NOT return an animated thumbnail.
Servers SHOULD prefer to return image/webp thumbnails when supporting animation.
When true and the media cannot be animated, such as in the case of a JPEG or PDF, the server SHOULD behave as though animated is false.
Response
A thumbnail of the requested content.
Changes
No recorded changes to this operation across all 1 revision of this API.