Thumbnail
The Thumbnail component previews an image URL and falls back to a file graphic when no valid image is available.
Import
File fallback
Sizes
Pass the document through doc when possible so the image receives its filename as alternative text.
Common props
These are the props most commonly used with this component. See its exported types in @payloadcms/ui for the complete list.
Prop | Type | Default | Description |
|---|---|---|---|
| | — | Image URL to preview. |
| | — | Supplies file metadata such as |
| | | Sets the thumbnail dimensions. |
| | — | Sets the rendered image width. |
| | — | Sets the rendered image height. |
| | — | Adds a cache-busting value to the image URL. |
Was this page helpful?