Skip to main content
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 sizeName is set.
  • Bunny Stream videos — uses the frame captured at stream.thumbnailTime.

Options

Cache-busting with appendTimestamp

Thumbnails have 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 per config if you don’t want it:
To make this effective on Bunny’s side too, go to your Pull Zone → Caching → enable Vary Cache for URL Query String, and add t to the vary parameter list.If you need immediate cache invalidation everywhere instead of relying on the browser refetching, use cache purging.

Resizing with queryParams

Using a named image size

Custom transform function

thumbnail accepts the same URL-transform options as urlTransform. For full control over the thumbnail URL, provide transformUrl instead of appendTimestamp/queryParams — it replaces them, and you build the URL yourself. sizeName and streamAnimated still apply.
The function receives the same arguments as urlTransform.transformUrl (baseUrl, collection, filename, prefix, data) and returns the final URL string.

Collection overrides

See Collection overrides for the full list of options you can tune per collection.