---
title: "Download a thumbnail of content from the content repository"
method: GET
path: "/_matrix/client/v1/media/thumbnail/{serverName}/{mediaId}"
tags: ["Media"]
---

# Download a thumbnail of content from the content repository

`GET /_matrix/client/v1/media/thumbnail/{serverName}/{mediaId}`

## Request

- Base URL: `https://matrix.org`
- URL: `https://matrix.org/_matrix/client/v1/media/thumbnail/{serverName}/{mediaId}`
- Auth: one of:
  - API key in query parameter `access_token`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/matrix/apis/matrix-client-server-api/docs/_matrix/client/v1/media/thumbnail/:serverName/:mediaId/get.ts> (a function with typed inputs; its response is checked against the schema)

Download a thumbnail of content from the content repository.
See the [Thumbnails](https://spec.matrix.org/v1.19/client-server-api/#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).

## Path parameters

- `serverName` string, mx-server-name, required
- `mediaId` string, required

## Query parameters

- `width` integer, required
- `height` integer, required
- `method` 'crop' | 'scale'
- `timeout_ms` integer
- `animated` boolean

## Response `200`

A thumbnail of the requested content.

## Other responses

- `307`: A redirect to the thumbnail of the requested content.
- `308`: A redirect to the thumbnail of the requested content.
- `400`: The request does not make sense to the server, or the server cannot thumbnail the content. For example, the client requested non-integer dimensions or asked for negatively-sized images.
- `413`: The local content is too large for the server to thumbnail.
- `429`: This request was rate-limited.
- `502`: The remote content is too large for the server to thumbnail.
- `504`: The content is not yet available. A [standard error response](https://spec.matrix.org/v1.19/client-server-api/#standard-error-response) will be returned with the `errcode` `M_NOT_YET_UPLOADED`.

---

[API](https://skmtc.dev/matrix/apis/matrix-client-server-api.md) - [All operations](https://skmtc.dev/matrix/apis/matrix-client-server-api/llms.txt) - [OpenAPI document](https://skmtc.dev/matrix/apis/matrix-client-server-api/revisions/c7fe4072c681?raw)
