ThumbnailProvider
Since Plugin API: 2.0.0
A static raster renderer selected independently from Preview and Editor providers.
Signature
interface ThumbnailProvider { type: "thumbnail"; id: string; name: string; priority?: number; extensions?: string[]; mimeTypes?: string[]; categories?: FileCategory[]; canHandle?: (file: FileEntry, api: FileMatchAPI) => boolean; rendererVersion: string; presentationVariants?: readonly ("platform" | "theme")[]; requiredHostFeatures?: ThumbnailHostFeature[]; requiredHostPlatforms?: readonly ("macos" | "windows" | "linux" | "other")[]; render(context: ThumbnailRenderContext): Promise<ThumbnailRenderResult> | ThumbnailRenderResult;}Members
| Name | Type | Required | Description |
|---|---|---|---|
type |
"thumbnail" |
yes | - |
id |
string |
yes | - |
name |
string |
yes | - |
priority |
number |
no | - |
extensions |
string[] |
no | - |
mimeTypes |
string[] |
no | - |
categories |
FileCategory[] |
no | - |
canHandle |
(file: FileEntry, api: FileMatchAPI) => boolean |
no | - |
rendererVersion |
string |
yes | Change when rendering behavior changes. |
presentationVariants |
readonly ("platform" | "theme")[] |
no | Declare Client presentation inputs that can change the encoded image. |
requiredHostFeatures |
ThumbnailHostFeature[] |
no | Host capabilities required by this renderer. |
requiredHostPlatforms |
readonly ("macos" | "windows" | "linux" | "other")[] |
no | Executing Host platform eligibility, independent of the Client OS. |
render |
(context: ThumbnailRenderContext) => Promise<ThumbnailRenderResult> | ThumbnailRenderResult |
yes | - |