tauri-apps / tauri-apps/plugins-workspace
Unable to readImage() using clipboard-manager
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 602
- Avg merge
- 4d 14h
- Merged PRs (30d)
- 9
Description
### Describe the bug
I've installed clipboard-manager
I want to be able to read images from the clipboard.
I have this in my `capabilities.json`:
```json
"clipboard-manager:allow-read-image",
"clipboard-manager:allow-read-text"
```
I'm attempting to read an image like this:
```js
case "KeyV":
if (e.ctrlKey) {
const any = await readImage();
console.log(any);
}
break;
```
Getting the following error when 'pasting' an image
`Uncaught (in promise) The clipboard contents were not available in the requested format or the clipboard is empty.`
This happens when the clipboard is not empty, and with an image is in a clipboard, as tested in https://evercoder.github.io/clipboard-inspector/
`await readText();` works fine when I just have plain text.
### Reproduction
_No response_
### Expected behavior
I expected `await readImage();` to not throw an error if I have an image in my clipboard.
### Full `tauri info` output
```text
[✔] Environment
- OS: Windows 10.0.26200 x86_64 (X64)
✔ WebView2: 151.0.4129.107
✔ MSVC:
- Visual Studio Build Tools 2026
- Visual Studio Community 2026
✔ rustc: 1.96.0 (ac68faa20 2026-05-25)
✔ cargo: 1.96.0 (30a34c682 2026-05-25)
✔ rustup: 1.29.0 (28d1352db 2026-03-05)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 24.18.0
- npm: 11.16.0
[-] Packages
- tauri 🦀: 2.11.5
- tauri-build 🦀: 2.6.3
- wry 🦀: 0.55.1, (outdated, latest: 0.56.1)
- tao 🦀: 0.35.3, (outdated, latest: 0.37.0)
- @tauri-apps/api ⱼₛ: 2.11.0 (outdated, latest: 2.11.1)
- @tauri-apps/cli ⱼₛ: 2.11.2 (outdated, latest: 2.11.4)
[-] Plugins
- tauri-plugin-clipboard-manager 🦀: 2.3.3
- @tauri-apps/plugin-clipboard-manager ⱼₛ: 2.3.3
- tauri-plugin-opener 🦀: 2.5.5
- @tauri-apps/plugin-opener ⱼₛ: 2.5.4 (outdated, latest: 2.5.5)
- tauri-plugin-process 🦀: 2.3.1
- @tauri-apps/plugin-process ⱼₛ: 2.3.1
- tauri-plugin-updater 🦀: 2.11.0
- @tauri-apps/plugin-updater ⱼₛ: 2.11.0
- tauri-plugin-log 🦀: 2.9.1
- @tauri-apps/plugin-log ⱼₛ: 2.9.1
- tauri-plugin-dialog 🦀: 2.7.3
- @tauri-apps/plugin-dialog ⱼₛ: 2.7.1 (outdated, latest: 2.7.3)
- tauri-plugin-fs 🦀: 2.5.2
- @tauri-apps/plugin-fs ⱼₛ: 2.5.1 (outdated, latest: 2.5.2)
[-] App
- build-type: bundle
- CSP: unset
- frontendDist: ../dist
- devUrl: http://localhost:1420/
- framework: React
- bundler: Vite
```
### Stack trace
```text
```
### Additional context
_No response_
Contributor guide
Research direction
Start by tracing the clipboard-manager readImage() implementation and its Windows clipboard handling, using the capabilities.json permissions and the JavaScript readText() call as comparisons. Reproduce on Windows with an image copied to the clipboard; done means readImage() resolves with the clipboard image instead of reporting that the format is unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100