Image Paste Functionality Broken on Windows Platform
Bug Description The ctrl+v for putting an image is not working at all on windows
Environment Info
- Platform: win32
- Terminal: cursor
- Version: 1.0.59
- Feedback ID: 554150ff-9be0-44e0-aaa0-a35e9bea1ac7
Errors
[]
Same problem with claude running from Ubuntu 24.04 WSL in Windows 11. I can paste the image (CTRL+V) on the clipboard to any other program fine. But in claude pressing CTRL+V does nothing.
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
I think it only works for MAC - not on windows (WSL). I have to manually drag the image into my repo and from there into the Claude CLI. Ugly but it works. A copy + paste would really be appreciated.
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
It is not generating a wsl path for the screenshot it is a normal windows path
Same here
CTRL+V stopped working for me around 10 days ago. Alt+V now works. Did nout found any doc or info on that in docs :/
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.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still happening.
Python workaround for Windows users (no exe required)
For those who can't use shotpath.exe due to corporate security policies blocking downloads or PowerShell Constrained Language Mode, here's a pure Python alternative:
Setup
- Install dependencies:
pip install pillow pyperclip
- Save this as
shotpath_watch.pyin your home folder:
import os
import time
import hashlib
from datetime import datetime, timedelta
from PIL import ImageGrab
import pyperclip
folder = os.path.join(os.environ['TEMP'], 'shotpath')
os.makedirs(folder, exist_ok=True)
def cleanup_old_files(max_age_hours=24):
"""Delete screenshots older than max_age_hours"""
cutoff = datetime.now() - timedelta(hours=max_age_hours)
deleted = 0
for f in os.listdir(folder):
filepath = os.path.join(folder, f)
if os.path.isfile(filepath):
mtime = datetime.fromtimestamp(os.path.getmtime(filepath))
if mtime < cutoff:
os.remove(filepath)
deleted += 1
if deleted:
print(f"[cleanup] Deleted {deleted} files older than {max_age_hours}h")
last_hash = None
last_cleanup = datetime.now()
print("ShotPath watcher running... (Ctrl+C to stop)")
print("Take a screenshot with Win+Shift+S - path will auto-copy to clipboard")
print("Auto-cleanup: files older than 24h deleted hourly\n")
cleanup_old_files() # Initial cleanup
while True:
try:
img = ImageGrab.grabclipboard()
if img:
img_hash = hashlib.md5(img.tobytes()).hexdigest()
if img_hash != last_hash:
last_hash = img_hash
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
filepath = os.path.join(folder, f"shot_{timestamp}.png")
img.save(filepath)
pyperclip.copy(filepath)
print(f"[{timestamp}] Saved: {filepath}")
# Cleanup every hour
if datetime.now() - last_cleanup > timedelta(hours=1):
cleanup_old_files()
last_cleanup = datetime.now()
time.sleep(0.5)
except KeyboardInterrupt:
print("\nStopped.")
break
except:
time.sleep(0.5)
- For auto-start on Windows login, save this as
shotpath.vbsin your Startup folder (%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\):
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "pythonw """ & CreateObject("WScript.Shell").ExpandEnvironmentStrings("%USERPROFILE%") & "\shotpath_watch.py""", 0, False
Usage
Win+Shift+S→ snip screenshot- Path is auto-copied to clipboard
- Paste path into Claude Code
- Files older than 24h are auto-deleted
Works around both the clipboard image detection bug and corporate security restrictions that block exe downloads.