Skip to content

ElectronNativeImageModule.createFromPath method

ElectronNativeImageModule › createFromPath

Unofficial

Creates a new NativeImage instance from a file located at path. This method returns an empty image if the path does not exist, cannot be read, or is not a valid image.

Signature:

createFromPath(path: string): ElectronNativeImage

Parameters:

Parameter Type Description
path string The path to the image file.

Returns: ElectronNativeImageThe created image.