[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

View original on GitHub ↗

70 Comments

empz · 1 year ago

If getting a keyboard shortcut to paste that works well across all platforms, OS, terminals and shells is tricky, maybe considering adding something like @clipboard to reference it?

That way we could tell Claude "check the screenshot on the @clipboard for a reference".

mirkancal · 1 year ago

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" />

1WorldCapture · 1 year ago

Support directly paste image to CLI is very important for productivity!

andybergon · 1 year ago

Have you tried Ctrl + V instead of Cmd + V?

empz · 1 year ago
Have you tried Ctrl + V instead of Cmd + V?

I'm on Windows, there's no Cmd + V.

CoderF3ff · 1 year ago

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

satoooh · 1 year ago

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 reads text/plain from clipboardData, dropping files and other MIME types.
Ctrl + V (event.ctrlKey) isn’t intercepted, so default(?) paste event 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" />

empz · 1 year ago
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 reads text/plain from clipboardData, dropping files and other MIME types. Ctrl + V (event.ctrlKey) isn’t intercepted, so default(?) paste event bubbles up to the outer chat layer, which correctly attaches image files.

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

danielraffel · 1 year ago

thanks for documenting this @satoooh good can confirm ctrl + v works 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.

aphronio · 1 year ago

this solution works for me on wsl2 and windows (technically platform agnostic, you have to modify the paths):

  1. Create a script to find latest screenshot at ~/.local/bin/lastshot:

```
#!/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
```

  1. Make it executable: chmod +x ~/.local/bin/lastshot
  1. Add to CLAUDE.md:

When I type "ss" in a message, automatically run lastshot and use the Read tool to display my latest
screenshot.

  1. Usage:

Type ss in any Claude messageand it automatically reads the last screenshot.

Why it works

  • Symlinks avoid permission issues
  • Works in any project directory
  • No need to save/copy file paths
  • Script handles Windows path translation

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

cd-rite · 1 year ago
this solution works for me on wsl2 and windows (technically platform agnostic, you have to modify the paths): > .................. > 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.

This works great! Easier than copy/paste as long as your screenshot utility is configured to save automatically. Thank you!

drswobodziczka · 1 year ago

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 :)

thecodecentral · 1 year ago

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.

VamshiGoud · 1 year ago

In ubuntu I solved this particualr issue by installing xclip.

shukebeta · 1 year ago

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.

shukebeta · 1 year ago

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.

rizrmd · 11 months ago

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

printlndarling · 11 months ago
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.

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!

lsntkadev · 11 months ago

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

shukebeta · 11 months ago

@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.

10eputzen · 11 months ago
@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)

Xanacas · 11 months ago

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.

glebtv · 10 months ago

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).

bgmulinari · 10 months ago
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).

MichaelHindley · 10 months ago

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 :/

ignatovv · 10 months ago
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 🙏

nasodaengineer · 10 months ago

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.

10eputzen · 10 months ago

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)

lsntkadev · 10 months ago

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

deadeuzesse · 10 months ago

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)

ChrisDemahy · 10 months ago

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

shukebeta · 10 months ago

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.

slcnx · 10 months ago

codeflow-studio.claude-code-extension vscode extension 可以直接粘贴截图

AndreVianna · 10 months ago

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)

phelix001 · 10 months ago

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:

  • VSCode Version: 1.104.0
  • Commit: f220831ea2d946c0dcb0f3eaa480eb435a2c1260
  • Architecture: x64
  • Platform: Linux Ubuntu 25.04

Claude Extension:

  • Extension ID: anthropic.claude-code
  • Extension Version: 1.0.113
  • Additional Extension: saoudrizwan.claude-dev (also installed)

System Environment:

  • OS: Ubuntu 25.04 "Plucky" (Linux x64)
  • Kernel: Linux 6.17.0-061700rc5-generic
  • Display Server: Wayland
  • Desktop Environment: Ubuntu (GNOME)
  • Node.js: v20.19.3

Issue: Unable to paste images into Claude Code extension interface

Environment Context:

  • Display Session: Wayland (not X11)
  • Ubuntu Version: 25.04 (very recent release)
  • VSCode: Running on Linux with Wayland display server

Potentially Relevant Details:

  • Wayland clipboard handling might differ from X11
  • Ubuntu 25.04 is a very recent release (might have newer clipboard/input APIs)
  • Multiple Claude extensions installed (anthropic.claude-code + saoudrizwan.claude-dev)

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.

phelix001 · 10 months ago

● 🐛 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:

  • Linux distributions (Ubuntu, Fedora, Arch, etc.)
  • Wayland display server (most common cause)
  • X11 systems may also be affected
  • All terminal environments (VSCode, native terminals, SSH sessions)

Symptoms:

  • Ctrl+V does nothing when clipboard contains an image
  • No error message or feedback
  • Text pasting works normally
  • Screenshots and images cannot be shared directly with Claude

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 lastshot and use the Read tool to display my latest screenshot.

Quick Commands:

  • ss = Read latest screenshot automatically
  • lastshot = Get file path of latest screenshot

How to Use the Workaround

Method 1: Auto-Screenshot with "ss" (Recommended)

  1. Take screenshot (Ctrl+Shift+PrtSc or your preferred method)
  2. In Claude Code, type: ss
  3. Claude automatically displays your latest screenshot

Method 2: Manual File Path

  1. Take screenshot
  2. In terminal, run: lastshot
  3. Copy the file path output
  4. In Claude Code, paste: file:///path/to/your/screenshot.png

Method 3: Direct File Reference

  1. Take screenshot
  2. In Claude Code, type: "Check this screenshot: [drag file or type path]"
  3. Claude reads the image file

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

  • Why This Works: Uses file system instead of problematic clipboard APIs
  • Performance: Instant file access vs. clipboard polling
  • Compatibility: Works across all terminals, SSH sessions, containers
  • Storage: Screenshots remain accessible for future reference

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.

johannesnormannjensen · 9 months ago

The issue might be that you're missing clipboard utilities.
If you're on Ubuntu 24.04.3 LTS in X11 mode but don't have xclip installed that might explain the issue.

Install the missing clipboard tool:
sudo apt install xclip

EDIT: This is a solution that worked for me and I can't guarantee that it's a fix for everyone @lsntkadev

lsntkadev · 9 months ago
The issue might be that you're missing clipboard utilities. If you're on X11 but don't have xclip installed that might explain the issue. Install the missing clipboard tool: sudo apt install xclip Now it should work

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

johannesnormannjensen · 9 months ago
> The issue might be that you're missing clipboard utilities. If you're on X11 but don't have xclip installed that might explain the issue. > Install the missing clipboard tool: sudo apt install xclip > Now it should work 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

giswqs · 9 months ago
The issue might be that you're missing clipboard utilities. If you're on Ubuntu 24.04.3 LTS in X11 mode but don't have xclip installed that might explain the issue. Install the missing clipboard tool: sudo apt install xclip EDIT: This is a solution that worked for me and I can't guarantee that it's a fix for everyone @lsntkadev

@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.

servaasvdc · 9 months ago

xclip solution is not working for me on NixOS / Wayland / niri / kitty. Ctrl+V keeps saying "No image found in clipboard" despite there being an image

matyas · 9 months ago

The macOS workaround I'm using with Raycast (but can be done in with other apps too):

  1. create a Raycast script, update the remote host and the remote directory
#!/bin/bash

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Sync Clipboard
# @raycast.mode silent

# Optional parameters:
# @raycast.icon 🤖

set -euo pipefail

# Configuration — adjust these
REMOTE="user@host"
REMOTE_DIR="~/screenshots"

# 1. Create a local temp file
TMPFILE="/tmp/shot-$(date +%Y%m%d-%H%M%S).png"

# 2. Let user select area (interactive) — -i is interactive, -c would go to clipboard, -o to file
screencapture -i "$TMPFILE"

# 3. (Optional) you could wait if user cancelled
if [ ! -f "$TMPFILE" ]; then
  echo "No screenshot taken."
  exit 1
fi

# 4. SCP it into the remote
# Expand remote dir properly
ssh "$REMOTE" "mkdir -p $REMOTE_DIR"
scp "$TMPFILE" "$REMOTE:$REMOTE_DIR/"

# 5. Compute absolute path on remote
REMOTE_BASE=$(ssh "$REMOTE" "echo $REMOTE_DIR/$(basename $TMPFILE)")

# 6. Copy that path string into macOS clipboard
printf "%s" "$REMOTE_BASE" | pbcopy

# 7. Remove local temp
rm -f "$TMPFILE"

# 8. Optionally echo it for debugging
echo "Uploaded to $REMOTE_BASE and path copied to clipboard."
  1. set a hotkey for the script in Raycast e.g. option + shift + 4
  2. use it
  3. the remote absolute path of the screenshot is now copied the host's clipboard, use command + v to insert it on the remote to Claude Code, it will recognise it as an image

Works very similarly to how it would on your host, shows [Image #1] the same way.

dr14-make · 8 months ago
The issue might be that you're missing clipboard utilities. If you're on Ubuntu 24.04.3 LTS in X11 mode but don't have xclip installed that might explain the issue. Install the missing clipboard tool: sudo apt install xclip EDIT: This is a solution that worked for me and I can't guarantee that it's a fix for everyone @lsntkadev

Confirmed solution works, Thanks

Motaphe · 8 months ago

``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.

mhenke · 8 months ago

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:

  • ❌ No clipboardy (Node.js clipboard lib with Wayland support)
  • ❌ No img-clipboard (image clipboard lib)
  • ✅ Only has 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:

wl-paste --list-types
# Output: image/png, image/avif, image/jxl, image/tiff, image/webp, image/jpeg ✅

wl-paste --type image/png > /tmp/test.png  # Successfully extracts 23KB PNG ✅

Working Workaround

Created bash script that properly reads Wayland clipboard and converts images to file paths:

~/bin/clip2path:

#!/bin/bash
CLIPBOARD_TYPES=$(wl-paste --list-types 2>/dev/null)

if echo "$CLIPBOARD_TYPES" | grep -q "image/"; then
    IMAGE_TYPE=$(echo "$CLIPBOARD_TYPES" | grep "image/" | head -n1)
    EXTENSION="${IMAGE_TYPE#image/}"
    TEMP_FILE="/tmp/claude-clipboard-$(date +%Y%m%d-%H%M%S).$EXTENSION"
    wl-paste --type "$IMAGE_TYPE" > "$TEMP_FILE" 2>/dev/null
    echo "\"$TEMP_FILE\""
else
    wl-paste 2>/dev/null
fi

Usage: clip2path → copy file path → paste into Claude Code

Tested & Working:

  • ✅ System screenshots (Grimblast, Spectacle)
  • ✅ Browser screenshots (Firefox/Zen built-in tool)
  • ✅ Multiple formats (PNG, JPEG, WebP, AVIF, JXL)
  • ✅ Text fallback

Recommended Fix

Add proper clipboard libraries with Wayland support:

Platform detection:

  • Wayland → wl-paste
  • X11 → xclip/xsel
  • macOS → pbpaste
  • Windows → PowerShell

---

Full investigation details available if needed. This affects all Wayland users migrating from X11.

mhenke · 8 months ago

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:

---
description: Paste an image from clipboard (Wayland workaround)
---

# Clipboard Image Paste

Execute the following steps to attach an image from the clipboard:

1. Run the bash command: `~/bin/clip2path`
2. This will output a file path like: `"/tmp/claude-clipboard-TIMESTAMP.png"`
3. Read that image file using the Read tool
4. The image will be attached to the conversation

This is a workaround for Wayland clipboard limitations in Claude Code.

Usage

After restarting Claude Code:

  1. Copy image to clipboard
  2. Type: /paste-image
  3. Done! ✅

The image is automatically extracted and attached - no manual bash commands or copy/paste needed.

Why This Is Better

  • One command instead of three steps (!~/bin/clip2path → copy path → paste path)
  • No bash mode required (! prefix)
  • Automatic attachment - Claude handles extraction and reading
  • Cleaner workflow - feels nearly native

Complete Solution

Files needed:

  1. ~/bin/clip2path script (from previous comment)
  2. ~/.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.

10eputzen · 8 months ago
## 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: --- description: Paste an image from clipboard (Wayland workaround) --- # Clipboard Image Paste Execute the following steps to attach an image from the clipboard: 1. Run the bash command: ~/bin/clip2path 2. This will output a file path like: "/tmp/claude-clipboard-TIMESTAMP.png" 3. Read that image file using the Read tool 4. The image will be attached to the conversation This is a workaround for Wayland clipboard limitations in Claude Code. ### Usage After restarting Claude Code: 1. Copy image to clipboard 2. Type: /paste-image 3. Done! ✅ The image is automatically extracted and attached - no manual bash commands or copy/paste needed. ### Why This Is Better One command instead of three steps (!~/bin/clip2path → copy path → paste path) No bash mode required (! prefix) Automatic attachment - Claude handles extraction and reading Cleaner workflow - feels nearly native ### Complete Solution Files needed: 1. ~/bin/clip2path script (from previous comment) 2. ~/.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

hemangjoshi37a · 8 months ago

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.

serverside-is · 8 months ago
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.

hemangjoshi37a · 8 months ago
> 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.

serverside-is · 8 months ago
> > 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.

egalanos · 7 months ago

@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:

  • checkImage uses xclip -selection clipboard -t TARGETS -o to detect if an image is available
  • On Wayland systems, xclip doesn't work properly (it can't access the Wayland clipboard)
  • This causes the image detection to fail, so Claude Code never attempts to paste
  • Even though saveImage has a fallback to wl-paste, it never gets called because the image detection fails first

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:

  1. Try xclip first (for X11)
  2. Fall back to wl-paste -l (which is what you mentioned works - listing available types) on Wayland

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.

amorriscode contributor · 7 months ago

A fix for this will be shipped in a release next week. Thanks for the patience folks!

bendavis78 · 7 months ago

I still have this issue on linux wayland.

Abenezer0001 · 7 months ago

when its fixed

10eputzen · 7 months ago

still the same issue on 2.0.53 on Windows using WSL2. I tried CTRL + v, CTRL + SHIFT + v, Win+v and ALT + v.

ValwareIRC · 7 months ago

I also have this issue on wayland linux.

marciomazza · 7 months ago

On arch + hyprland also.

Em qua., 26 de nov. de 2025, 06:10, Valerie Liu @.***>
escreveu:

ValwareIRC left a comment (anthropics/claude-code#1361) <https://github.com/anthropics/claude-code/issues/1361#issuecomment-3580314353> I also have this issue on wayland linux. — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/1361#issuecomment-3580314353>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAENQUPQROG5ME44CORQJZD36VVANAVCNFSM6AAAAAB6ARODZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKOBQGMYTIMZVGM> . You are receiving this because you are subscribed to this thread.Message ID: @.***>
ValwareIRC · 7 months ago

Workaround for now: drag and drop the image into the terminal

10eputzen · 7 months ago
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

Yuozas · 7 months ago

Ubuntu same thing for me still have it.

TheProcrastinatorDev · 7 months ago

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" />

hemangjoshi37a · 7 months ago

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 ?

it-sha · 7 months ago

@amorriscode Do we have any news about pasting an image from the clipboard on WSL?
With latest CC it's still not working

nicholas-moger · 7 months ago

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.

ethanfischer · 7 months ago

Anyone have this working on windows WSL? Coming from iTerm on mac, it's a huge missing feature for me!

hemangjoshi37a · 7 months ago

@ethanfischer just use ubuntu or some linux flevour , dont use windows in the first place . LOL

ValwareIRC · 7 months ago

@hemangjoshi37a clearly the problem exists on Ubuntu too

Yuozas · 7 months ago

I reinstalled it via new install sh instead of old npm way now on Ubuntu it seems like this weeks it works fine.

github-actions[bot] · 7 months ago

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.