[BUG] Can't paste image from clipboard
Resolved 💬 70 comments Opened May 27, 2025 by empz Closed Nov 21, 2025
💡 Likely answer: A maintainer (amorriscode, contributor)
responded on this thread — see the highlighted reply below.
In some presentation I saw this was possible. Simply pasting an image from the clipboard directly into Claude Code. I'm not talking about pasting an existing file path, but the image itself on the clipboard. Most screenshots tools allows you to quickly capture an screenshot and put it on the clipboard without the need to save it to the file system. This is highly convenient when iterating on UI changes.
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: <1.0.3
- Operating System: WSL2 (Ubuntu) on Windows 11
- Terminal: Windows Terminal - Version: 1.22.11141.0 - Ubuntu bash
70 Comments
If getting a keyboard shortcut to paste that works well across all platforms, OS, terminals and shells is tricky, maybe considering adding something like
@clipboardto reference it?That way we could tell Claude "check the screenshot on the @clipboard for a reference".
I have that issue on iTerm and MacOS 15.5. Also if you drag and drop from Finder multiple images, it doesn't work. It copies path of those images instead of image.
<img width="570" alt="Image" src="https://github.com/user-attachments/assets/c209be38-8121-466f-8c71-9ba203d67c26" />
Support directly paste image to CLI is very important for productivity!
Have you tried
Ctrl + Vinstead ofCmd + V?I'm on Windows, there's no Cmd + V.
Hi @rboyce-ant :)
Do we have any news about this issue?
Support for pasting an image to the CLI is essential for web development
Otherwise, for UI development is much more efficient to use Cursor or Windsurf
Do you need any additional info that may help?
Enviroment:
VSCode Version: 1.96.2
Commit: 53b99ce608cba35127ae3a050c1738a959750860
Date: 2025-06-04T19:44:25.253Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.22631
I’m on macOS Sequoia 15.1.1.
What I observe
| Action | Result |
|--------|--------|
| Take a screenshot while holding ⌃ (
⌃ ⇧ ⌘ 4) → Ctrl + V in Claude Code | 📸 Image is pasted / attached correctly || Same screenshot → Cmd + V | **Image is not pasted.** If there’s plain-text in the clipboard, that text is inserted; otherwise nothing happens. |
So on macOS Ctrl + V pastes images only, whereas Cmd + V pastes text only and silently ignores any
image/*MIME types.Why this might happen
It looks like the editor intercepts
Cmd + V(event.metaKey) and runs its own paste handler that only readstext/plainfromclipboardData, dropping files and other MIME types.Ctrl + V(event.ctrlKey) isn’t intercepted, so default(?)pasteevent bubbles up to the outer chat layer, which correctly attaches image files.<img width="1070" alt="Image" src="https://github.com/user-attachments/assets/c3b67a63-ff18-4166-8e54-0de2581eb404" />
I've recently upgraded to a Mac and I'm getting the same behaviour in Sequoia. Except that I get an error message but it looks like it's able to access the image.
!Image
thanks for documenting this @satoooh good can confirm
ctrl + vworks on macOS for pasting screenshots even if that wasn't what I expected. I hope this behavior improves to respect whatever was last in my clipboard irrespective of image or text.this solution works for me on wsl2 and windows (technically platform agnostic, you have to modify the paths):
```
#!/bin/bash
# ~/.local/bin/lastshot
LATEST=$(ls -1t /mnt/c/Users/YourUsername/Pictures/Screenshots/*.png | head -n1)
if [[ "$PWD" == /home/username/code/* ]]; then
mkdir -p ./tmp
ln -sf "$LATEST" ./tmp/latest_screenshot.png
echo "./tmp/latest_screenshot.png"
else
echo "$LATEST"
fi
```
When I type "ss" in a message, automatically runlastshotand use the Read tool to display my latestscreenshot.
Type ss in any Claude messageand it automatically reads the last screenshot.
Why it works
Takes 5 minutes to set up, saves hours of friction. The script is flexible. You can modify the screenshot path
or add filters as needed.
!Image
This works great! Easier than copy/paste as long as your screenshot utility is configured to save automatically. Thank you!
sounds ctrl + v is working for macos sonoma 14.1, zsh and claude code
this is nice workaround but why can't we have coherrent behaviour? you know doing cmd + v everywhere and ctrl + v for claude is not 100% convenient :)
For Linux, try this https://github.com/thecodecentral/gshot-copy. It requires X11. I haven't tested it in Wayland. Maybe someone can create a PR for Wayland.
In ubuntu I solved this particualr issue by installing xclip.
On Windows, I found 1.0.45 works well with pasting image directly in GitBash but recent versions don't. So I stick with 1.0.45 for now, surely 1.0.45 has its own issues, and I have a workaround for it, see https://blog.shukebeta.com/2025/07/12/fixing-claude-code-in-git-bash/ for detail.
on Pop!OS (based on Ubuntu Linux), I have another solution with Kitty terminal. see https://blog.shukebeta.com/2025/07/11/quick-fix-claude-code-image-paste-in-linux-terminal/ for detail.
I just created a windows app to do this, It will copy the current screenshot as path, and you can ctrl+v to claude code: https://github.com/rizrmd/shotpath
Hi, thanks for sharing the workaround and the blog link!
I'm currently on Windows 11, and I'm using PowerShell as the terminal when working with Claude Code.
I'm wondering — does your method also work in PowerShell, or is it Git Bash–specific?
Appreciate any insights!
hi folks,
im on mac. i run my code on a remote server and connect to it using ssh. i also develop on this remote server since my code needs lot of cpus to compile. i use claude code cli to help development on this remote server.
i want to paste images so that claude code cli can understand the context. remember claude code cli is still running remotely on a remote linux server and im connecting using ssh.
what workaround does exist to paste image right into the claude code cli terminal in vscode/webstorm?
thank you in advance
@lsntkadev I found the latest version 1.0.72 can work on gitbash (windows) and xfce4-terminal (linux x11) directly without any hacks. It should work on your mac I guess. Please try it with 1.0.72 and see if it works.
Can confirm that it works on gitbash (windows) but I am still not able do paste screenshots into my WSL terminal (even when I use windows git bash in there)
Can also confirm, pasting a image into claude code when running it within git bash for windows, is working.
Natively opening cc from windows terminal does not work however.
Works for me on arch linux with Xorg/i3, but does not work on another -- mostly the same setup -- Arch linux with KDE/Wayland.
Both use Kitty terminal (no ssh or containers).
Interesting. For me on Fedora with GNOME/Wayland (Ptyxis terminal) it works only if I copy the image from GNOME's Image Viewer (Loupe), otherwise pasting it does nothing.
If I copy the image directly from Firefox, for instance, it doesn't work (nothing to paste).
I'm observing that pasting with Control + V on my mac pastes the last copied textin clipboard, even if the current clipboard entry is an image, across all apps. Anyone else run across this strange behavior? Makes pasting into claude code with this method unusable :/
I have the exact same issue. It started happening this week. This brings a lot of suffering to my life. Please fix it 🙏
You can paste images directly into Claude Code as long as your screenshot tool supports copying the screenshot as a file to the clipboard, rather than just as image data.
I'm using PixPin as my screenshot tool, which has this capability. When you take a screenshot with PixPin, it copies the image as a file object to the clipboard, allowing you to paste it directly into Claude Code without needing to save it to the filesystem first.
According to Release 1.0.93 this issue should have been fixed with alt + v for Windows user - but I cannot confirm that using Windows + WSL + VSCode + various terminals (default, tmux, gitbash). [I am on release 1.0.96]
1.0.93
Windows: Add alt + v shortcut for pasting images from clipboard
Must be a good life at Anthropic when they can afford MacBooks for all employees.
Update It works indeed in the _Windows_ terminal in VS Code (alt + v)
Windows + Webstorm + SSH + Claude Code, here it still doesn't work pasting images unfortunately, anyways this is already a goated stack to code directly on servers with AI
I recently had CTRL+V stopped working on Claude Code on WIndows using git-bash . It worked for weeks.
Found out in another unrelated github issue that is now ALt+V. Created issue #7017
If it may help you (I did not tried with WSL)
Can confirm, when using Claude Code, under Ubuntu running in WSL, in the windows Terminal application, I cannot paste images. I have used "CTRL + V" to paste the image, as well as "windows + V" to seem my clipboard and select the image, and claude code does not receive the image or show any feedback to the inputs. Windows 11 version 24h2. Windows terminal version 1.22.12111.0
As far as I know version 1.0.45 and 1.0.85 works well on pasting image directly into claude code in my gitbash on Windows and other terminals on Linux.
codeflow-studio.claude-code-extension vscode extension 可以直接粘贴截图
Alt+V is not working on my Claude Code:
Claude Code v1.0.113
L Session ID: 315375c4-3f4d-4b2a-a274-7416edb73c86
Working Directory
L [redacted]
Account
L Auth Token: none
L API Key: ANTHROPIC_API_KEY
Memory • /memory
L project: [redacted]
Model • /model
L sonnet[1m] (claude-sonnet-4-20250514[1m])
Diagnostics
└ Currently running: npm-global (1.0.113)
└ Path: C:\Program Files\nodejs\node.exe
└ Invoked: C:\Users\[redacted]\AppData\Roaming\npm\node_modules\@anthropic-ai\claude-code\cli.js
└ Config install method: global
└ Auto-updates enabled: default (true)
└ Update permissions: Yes
└ Search: OK (vendor)
Linux: Ctrl-V doesnt paste images into Claude.
● Perfect! Here's your VSCode + Claude environment information for the bug report:
VSCode Environment for Claude Bug Report
VSCode Information:
Claude Extension:
System Environment:
Issue: Unable to paste images into Claude Code extension interface
Environment Context:
Potentially Relevant Details:
This gives the Claude team the specific VSCode and extension version info, plus the important detail that you're
running on Wayland rather than X11, which could be very relevant for clipboard/image pasting functionality issues.
● 🐛 Claude Code Linux Image Pasting Bug - Workaround Guide
Problem Description
Issue: Unable to paste images directly into Claude Code using Ctrl+V on Linux systems, particularly those running
Wayland display server.
Affected Systems:
Symptoms:
Root Cause
The issue stems from Wayland clipboard handling differences compared to X11. Claude Code's clipboard integration
doesn't properly handle Wayland's image clipboard formats, making direct image pasting impossible.
Pre-Requirements Check
Before applying the workaround, verify:
# 1. Check if you're on Wayland (most likely cause)
echo $XDG_SESSION_TYPE
# Should show: wayland
# 2. Verify screenshot directory exists
ls ~/Pictures/Screenshots/
# Should show your screenshot files
# 3. Check if you can take screenshots
# Take a test screenshot and verify it appears in Screenshots folder
Workaround Solution
Instead of clipboard pasting, use an automated screenshot workflow that's more reliable than clipboard integration.
Step 1: Install Prerequisites
# Install Wayland clipboard tools (optional, for debugging)
sudo apt update && sudo apt install wl-clipboard -y
# Verify installation
wl-paste --list-types
Step 2: Create Screenshot Alias
Add this to your ~/.bashrc:
# Add this line to ~/.bashrc
echo 'alias lastshot="find ~/Pictures/Screenshots/ -name \"*.png\" -type f -printf \"%T@ %p\n\" | sort -rn | head
-1 | cut -d\" \" -f2-"' >> ~/.bashrc
# Reload bashrc
source ~/.bashrc
Step 3: Configure Claude Code Auto-Screenshot
Add this to your project's CLAUDE.md file (or create it):
# CLAUDE.md
## 📸 SCREENSHOT WORKFLOW
When I type "ss" in a message, automatically run
lastshotand use the Read tool to display my latest screenshot.Quick Commands:
How to Use the Workaround
Method 1: Auto-Screenshot with "ss" (Recommended)
Method 2: Manual File Path
Method 3: Direct File Reference
Example Usage
# Take a screenshot, then:
$ lastshot
/home/username/Pictures/Screenshots/Screenshot From 2025-09-15 06-45-30.png
# In Claude Code:
# Either type "ss" for auto-display, or paste the file path
Verification Steps
Test the workaround works:
# 1. Test the alias
lastshot
# Should output your most recent screenshot path
# 2. Take a new screenshot
# Use your system's screenshot tool
# 3. Test again
lastshot
# Should show the new screenshot path
# 4. Test in Claude Code
# Type "ss" and verify Claude displays the image
Benefits of This Workaround
✅ More Reliable: No Wayland compatibility issues✅ Persistent: Screenshots saved permanently✅ Fast: Type "ss" for
instant display✅ Universal: Works on all Linux systems✅ Better Than Clipboard: No data loss, referenceable
history
Technical Notes
Alternative Screenshot Tools
If default screenshot tool doesn't work well:
# Install better screenshot tools
sudo apt install flameshot # Feature-rich screenshot tool
sudo apt install gnome-screenshot # GNOME default
sudo apt install spectacle # KDE screenshot tool
This workaround provides a more reliable solution than clipboard pasting and works consistently across all Linux
environments.
The issue might be that you're missing clipboard utilities.
If you're on
Ubuntu 24.04.3 LTSin X11 mode but don't have xclip installed that might explain the issue.Install the missing clipboard tool:
sudo apt install xclipEDIT: This is a solution that worked for me and I can't guarantee that it's a fix for everyone @lsntkadev
before you reply stuff, try it first yourself please
no it doesn't work, and why should it? it's a problem on anthropics side
I did try that myself and it worked for me - which is why i posted here to help others that might be in the same situation.
By the way I'm on
Ubuntu 24.04.3 LTS@johannesnormannjensen Thank you for providing the solution. I can confirm that after installing xclip on Manjaro Linux, I can now paste the image in Claude Code.
xclipsolution is not working for me on NixOS / Wayland / niri / kitty. Ctrl+V keeps saying "No image found in clipboard" despite there being an imageThe macOS workaround I'm using with Raycast (but can be done in with other apps too):
Works very similarly to how it would on your host, shows
[Image #1]the same way.Confirmed solution works, Thanks
``
xclip`` solution isn't working on arch / hyprland / kitty!I think the issue occurs because Kitty converts clipboard images to its proprietary format (application/glfw+clipboard-*) instead of preserving the standard image/png MIME type. When Claude Code calls wl-paste -t image/png, the clipboard advertises this custom format instead, causing detection to fail.
Wayland/Hyprland Investigation & Working Workaround
System: Linux Mint + Hyprland (Wayland) | Claude Code 2.0.27 | Tilix/Kitty terminals
Issue Confirmed
Image paste via Ctrl+V fails with "no image found in clipboard" despite clipboard containing valid image data.
Root Cause Found
Analyzed Claude Code's
package.json- zero clipboard dependencies:clipboardy(Node.js clipboard lib with Wayland support)img-clipboard(image clipboard lib)sharp(image processing, not clipboard access)Conclusion: Claude Code likely uses X11-only clipboard method (e.g., hardcoded
xclip) that can't access Wayland clipboard for images.System Verification
Confirmed Wayland clipboard is working correctly:
Working Workaround
Created bash script that properly reads Wayland clipboard and converts images to file paths:
~/bin/clip2path:Usage:
clip2path→ copy file path → paste into Claude CodeTested & Working:
Recommended Fix
Add proper clipboard libraries with Wayland support:
clipboardy- auto-detects Wayland, useswl-clipboardimg-clipboard- specifically for imagesPlatform detection:
wl-pastexclip/xselpbpaste---
Full investigation details available if needed. This affects all Wayland users migrating from X11.
Update: Improved Workaround with Custom Slash Command
Following up on my previous comment with an even better solution - a custom slash command that eliminates the manual copy/paste step.
Custom Slash Command Setup
Create
~/.claude/commands/paste-image.md:Usage
After restarting Claude Code:
/paste-imageThe image is automatically extracted and attached - no manual bash commands or copy/paste needed.
Why This Is Better
!~/bin/clip2path→ copy path → paste path)!prefix)Complete Solution
Files needed:
~/bin/clip2pathscript (from previous comment)~/.claude/commands/paste-image.md(slash command)This makes Wayland clipboard image pasting almost as seamless as native Ctrl+V. 🎉
---
Technical note: Slash commands in Claude Code can execute bash commands and read files automatically, making them perfect for this type of workaround workflow.
This is working fine on my WSL2
CONGRATULATIONS : i successfully resolved the issue. basically using ubuntu in wayland makes the image paste by CTRL+V work in claude code while in X11 does not work.
I use Kubuntu 24.10 (KDE + Ununtu) in Wayland and doesn't work.
then indeed you are using wrong OS in the first place if you are not using wayland. X11 is old and has some very much lacking features and has lots of load on CPU while wayland is much better.
Only when replying I noticed I wrote 24.10 instead of 25.10. My bad.
When I used X11 with Kubuntu 25.04, copy paste worked. A lot of things worked.
I am using wayland with Kubuntu 25.10, and copy paste is not working. A lot of things (not Claude Code related) don't work, because the platform is newer, and not all software is 100% ready for it. Time will solve this for sure.
@dicksontsai any chance of getting this fixed soon?
Claude code figured it out looking at the minified code in a few seconds so surely it should be a quick fix:
---
The Problem
The clipboard handling code for Linux is:
linux:{
checkImage:'xclip -selection clipboard -t TARGETS -o | grep -E "image/(png|jpeg|jpg|gif|webp)"',
saveImage:
xclip -selection clipboard -t image/png -o > "${B}" || wl-paste --type image/png > "${B}",getPath:"xclip -selection clipboard -t text/plain -o",
deleteFile:
rm -f "${B}"}
The issue: Claude Code checks for clipboard images using only xclip, not wl-paste:
The Fix Needed
The checkImage command should try wl-paste as well. It should be something like:
checkImage: 'xclip -selection clipboard -t TARGETS -o | grep -E "image/(png|jpeg|jpg|gif|webp)" || wl-paste -l | grep -E
"image/(png|jpeg|jpg|gif|webp)"'
This would:
Claude Code developers need to update this to properly detect Wayland sessions or at minimum add a fallback to wl-paste -l in the
image detection logic.
A fix for this will be shipped in a release next week. Thanks for the patience folks!
I still have this issue on linux wayland.
when its fixed
still the same issue on 2.0.53 on Windows using WSL2. I tried CTRL + v, CTRL + SHIFT + v, Win+v and ALT + v.
I also have this issue on wayland linux.
On arch + hyprland also.
Em qua., 26 de nov. de 2025, 06:10, Valerie Liu @.***>
escreveu:
Workaround for now: drag and drop the image into the terminal
can confirm that it works. But by default it gives the windows path if you drag it from the windows explorer. So after trying out the windows path it uses the correct linux path with WSL2
Ubuntu same thing for me still have it.
Same issue on PHPStorm's terminal on ubuntu. Forced to save the file physically, then the physical file is indeed pastable, but doesn't work directly from the clipboard.
<img width="519" height="84" alt="Image" src="https://github.com/user-attachments/assets/aa9efbe1-a35a-4702-958a-80a460b92407" />
still i beleive there is problem pasting image if we are using the claude-code tui using remote ssh connection . how to resolve this issue ?
@amorriscode Do we have any news about pasting an image from the clipboard on WSL?
With latest CC it's still not working
For anyone on Windows - for some reason Alt+V is working for me, drag and drop and Ctrl+V does not work. Im guessing ALT is understood as equivalent of cmd on mac.
Anyone have this working on windows WSL? Coming from iTerm on mac, it's a huge missing feature for me!
@ethanfischer just use ubuntu or some linux flevour , dont use windows in the first place . LOL
@hemangjoshi37a clearly the problem exists on Ubuntu too
I reinstalled it via new install sh instead of old npm way now on Ubuntu it seems like this weeks it works fine.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.