# Thumbnails (IRPCThumbnails)

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCThumbnails/

Gets thumbnail images of document files and the vault's thumbnail settings.

Provides methods for getting thumbnail-spefific information and operations.

- **gRPC service:** `MFiles.IRPCThumbnails`
- **Book and level:** [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md), standard
- **Methods:** 2
- **Proto file:** [`mfiles/IRPCThumbnails.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/IRPCThumbnails.proto)

<a id="overview"></a>

## Overview

Use [GetDocumentFileThumbnail](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCThumbnails/GetDocumentFileThumbnail/index.md) to show
a small picture of a file in a listing or a larger preview of its first page. All images are
PNG.

- **Classic thumbnails** (`THUMBNAIL_TYPE_CLASSIC`) are square images that the server generates
  once per file version with the file type handlers installed on the server, and then caches.
  Whether one exists is reported in `thumbnail_status`; not every file type has one.
- **Preview thumbnails** (`THUMBNAIL_TYPE_PREVIEW`) show the first page of the file in its own
  aspect ratio, scaled to fit the size you ask for. When no preview can be made, the server
  returns the file type's icon instead.
- [GetThumbnailOptions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCThumbnails/GetThumbnailOptions/index.md) tells whether
  thumbnails are enabled in the vault and which file types are excluded. M-Files desktop
  clients use it to decide whether to create classic thumbnails themselves.

Both methods need a vault session and no special vault rights. To identify a file, take the
`file_ver` of a [File](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.File/index.md) from the object version, for example from
[GetObjectFiles](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCObjectOperations/GetObjectFiles/index.md) or from the `files` of a
search result.

<a id="methods"></a>

## Methods

| Method | Summary | Facts |
|---|---|---|
| [GetDocumentFileThumbnail](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCThumbnails/GetDocumentFileThumbnail/index.md) | Gets a classic thumbnail or a first-page preview of one file of an object version, as PNG. | `read` `session` `idempotent` `returns metadata structure version` |
| [GetThumbnailOptions](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCThumbnails/GetThumbnailOptions/index.md) | Gets the vault's thumbnail settings. | `read` `session` `idempotent` `returns metadata structure version` |
