Skip to content

ElectronNativeImageModule.createThumbnailFromPath method

ElectronNativeImageModule › createThumbnailFromPath

Unofficial

Creates a thumbnail preview image for the file at path. Only available on macOS and Windows.

Signature:

createThumbnailFromPath(path: string, maxSize: ElectronSize): Promise<ElectronNativeImage>

Parameters:

Parameter Type Description
path string The path to the file to create a thumbnail for.
maxSize ElectronSize The maximum size of the thumbnail.

Returns: Promise<ElectronNativeImage>A promise that fulfills with the file's thumbnail preview image.