Get Thumbnail Representation

Guides Representations Get Thumbnail Representation
Edit this page

Get Thumbnail Representation

A thumbnail is a small image, either as .png or as .jpg that can be used in an application as a representation of the file, for example as a placeholder for a link that downloads or previews the file.

All thumbnail representations except 1024x1024 and 2048x2048 PNGs are generated upon uploading the source file to Box.

An deprecated way to get a thumbnail for a file is using the thumbnail API.

The process

To get a thumbnail representation follow the following steps

Sometimes the thumbnail can not be created directly. Instead, the API will return a HTTP 202 with a location response header. The location is for a temporary image that can be used while the thumbnail is being generated.

A retry-after response header is also provided to present you with an estimated amount of seconds before retrying this endpoint.


The following a some example x-rep-hints-header values

x-rep-hints: [jpg?dimensions=32x32]
Returns a 32x32 JPEG thumbnail
x-rep-hints: [jpg?dimensions=32x32][jpg?dimensions=1024x1024]
Returns 32x32 and 1024x1024 JPEG thumbnails
x-rep-hints: [jpg?dimensions=32x32][png?dimensions=2048x2048]
Returns a 32x32 JPEG and a 2048x2048 PNG thumbnail
x-rep-hints: [jpg?dimensions=2048x2048,png?dimensions=2048x2048]
Returns a 2048x2048 JPEG or a 2048x2048 PNG thumbnail, returning the first representation that is available. If neither is available it returns no representations

Supported file sizes

The following formats and sizes of thumbnails are available.

File TypeDimensions
JPG32x32, 94x94, 160x160, 320x320, 1024x1024, 2048x2048*
PNG1024x1024*, 2048x2048*

Some restrictions apply to the sizes marked as *.

File size restrictions

JPEG 2048x2048

The JPEG 2048x2048 size is only available when the original file is a JPEG. We recommend either requesting a PNG or both a PNG and a JPEG for this dimension.

Video files

JPEG 2048x2048, PNG 2048x20148 and PNG 1024x1024 representations are not available for video files.

Original file size

Thumbnails are not scaled up. If the original file size of the file uploaded to Box is smaller than the representation dimensions, the resulting thumbnail is capped at the size of the original file.

Supported file types

At this time the following file types are supported.

File TypeFile Extensions
Documentsdoc, docx, gdoc, gsheet, gslide, gslides, odp, ods, odt, pdf, ppt, pptx, rtf, wpd, xls, xlsm, xlsx, key, pages, numbers
Imagesai, bmp, gif, eps, jpeg, jpg, png, ps, psd, svg, tif, tiff, dcm, dicm, svs, tga
Audioaac, aifc, aiff, amr, au, flac, m4a, mp3, ogg, ra, wav, wma
Video3g2, 3gp, avi, m2v, m2ts, m4v, mkv, mov, mp4, mpeg, mpg, ogg, mts, qt, wmv

For document file types the representation returned will be a placeholder icon and not an actual thumbnail.