thumbnail populates a hidden thumbnailURL field on your upload documents, which the admin panel uses to show a preview image in list and edit views, and which is available in every API response.
payload.config.ts
- Images — uses the original file, or a specific size if
sizeNameis set. - Bunny Stream videos — uses the frame captured at
stream.thumbnailTime.
Options
Cache-busting with appendTimestamp
Thumbnails haveurlTransform.appendTimestamp on by default. When a file is replaced (for example, during image cropping), the timestamp changes and browsers fetch the new version instead of a cached copy. While it is enabled, the plugin also disables Payload’s cache tags for the thumbnail field, to avoid caching conflicts.
Opt out in the options if you don’t want it:
Resizing with queryParams
Using a named image size
Custom transform function
For full control over the thumbnail URL, pass a function asthumbnail.urlTransform. It replaces appendTimestamp and queryParams, and you build the URL yourself. sizeName and streamAnimated still apply.
urlTransform function (baseUrl, collection, filename, prefix, data) and returns the final URL string.
Collection overrides
thumbnail keeps the global thumbnail.urlTransform unless it sets its own. A collection thumbnail.urlTransform object merges onto a global object and replaces a global function.
See Collection overrides for the full list of options you can tune per collection.