fromPath
Creates a new image using the provided path.
Only ico and png are supported (based on activated feature flag).
Note that you need the image-ico or image-png Cargo features to use this API. To enable it, change your Cargo.toml file:
[dependencies]
tauri = { version = "...", features = ["...", "image-png"] }Content copied to clipboard
The path is resolved on the Rust side, so it must be a path on the user's machine (for example one returned by the path APIs or a bundled resource resolved with resolveResource), not a frontend asset URL.
Since
2.0.0