Native image paste support in Claude Code CLI/TUI using data:image/png;base64
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Currently, there is no way to paste an image from the clipboard into Claude Code's terminal interface (CLI or fullscreen TUI mode). The only workaround is saving the image to a file and referencing its path, which is cumbersome for quick screenshot sharing during debugging sessions.
Proposed Solution
When the user pastes (Cmd+V / Ctrl+V) while the cursor is in the Claude Code prompt, and the clipboard contains image data (not text), Claude Code should:
- Detect the image content in the clipboard
- Read the clipboard image bytes, base64-encode them, and construct the {"type":"image","source":{"type":"base64","media_type":"image/png","data":"..."}} payload expected by the Anthropic Messages API
- Attach it as a vision API message, the same way image files are handled today
Workaround considered: Base64-encoding the clipboard image and pasting as a data:image/png;base64,... string — but this requires external tooling to bridge steps 2-3, and Claude Code doesn't recognize the data URI format as image input anyway.
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
quick screen capture in clipboard (both windows and mac support this now) and paste in claude code cli. No need to fluff around with files and paths.
Additional Context
_No response_