Claude Code Image Paste
⚡ Unofficial personal extension for VS Code — developed as an individual project.
This tool helps you work smoother with Claude Code by pasting clipboard images directly into chats.
Note: This extension is not affiliated with or endorsed by Anthropic.
Features
- Windows-native clipboard image detection with ARM64 support
- Claude Code chat integration with automatic context detection
- Configurable save directory within workspace
- Timestamp-based file naming with collision avoidance
- Multiple output formats (PNG/JPEG) with quality control
- Flexible insertion formats (path/markdown/html)
- Comprehensive configuration options
System Requirements
- OS: Windows 10/11 (x64 or ARM64)
- VS Code: 1.85.0 or higher
- PowerShell: Windows PowerShell 5.1+ or PowerShell 7+ (ARM64 recommended)
Installation
- Install from VS Code Marketplace
- Enable the extension in VS Code settings
- Start using Ctrl+Shift+V in Claude Code chat windows
Usage
- Copy a screenshot or image to clipboard
- Open Claude Code chat in VS Code
- Press Ctrl+Shift+V in the chat input field
- The image is automatically saved and path inserted
Configuration
Basic Settings
Setting |
Default |
Description |
claudeImagePaste.enabled |
true |
Enable/disable extension |
claudeImagePaste.interceptCtrlShiftV |
true |
Intercept Ctrl+Shift+V keystrokes |
claudeImagePaste.scope.chatOnly |
true |
Only activate in Claude Code chat |
File Management
Setting |
Default |
Description |
claudeImagePaste.saveDirectory |
.claude-images |
Image save directory (workspace-relative) |
claudeImagePaste.fileName.pattern |
image_${yyyy}${MM}${dd}_${HH}${mm}${ss}_${seq3} |
File naming pattern |
claudeImagePaste.output.format |
png |
Output format (png/jpeg) |
claudeImagePaste.limits.maxFileSizeMB |
10 |
Maximum file size in MB |
Insertion Options
Setting |
Default |
Description |
claudeImagePaste.insert.format |
path |
Insert format (path/markdown/html) |
claudeImagePaste.insert.altSource |
filename |
Alt text source for markdown/html |
💡 Tip: More advanced options (JPEG quality, sequence digits, custom alt text, notifications, etc.)
are available via VS Code Settings (claudeImagePaste.*
).
Architecture
Core Components
extension.ts # Main entry point and activation
├── KeyboardInterceptor # Ctrl+Shift+V interception
├── ClaudeCodeDetector # Claude Code context detection
├── ClipboardManager # Windows clipboard operations
├── ImageProcessor # Image processing with Sharp.js
└── ConfigurationManager # Settings validation and management
- ARM64 Windows: Native PowerShell 7 execution with x64 fallback
- Automatic detection: Optimal PowerShell version selection
- Graceful degradation: Sharp.js fallback for unsupported architectures
Troubleshooting
Common Issues
PowerShell Execution Errors
- Check PowerShell execution policy
- ARM64 users: Install PowerShell 7 for best performance
Images Not Saving
- Ensure workspace is open
- Verify write permissions to save directory
Claude Code Not Detected
- Disable
scope.chatOnly
for testing
- Check if active editor is Claude Code related
Sharp.js Loading Issues
If you see Could not load the "sharp" module
warnings, the extension automatically falls back to PNG preservation mode. This is normal on ARM64 systems without native Sharp.js binaries.
Solutions:
- Use x64 VS Code for full Sharp.js support
- Install native libvips and run
npm rebuild sharp
- The fallback mode works perfectly for most use cases
Contributing
Pull requests and issues are welcome! Please note this is a personal project, maintained in my spare time.
Contributions are appreciated, but support and response times may vary.
License
MIT License - see LICENSE file for details.
Support
For issues and feature requests, please use the GitHub issue tracker.
This is a personal, unofficial project — so please keep in mind that support is on a best-effort basis 🙏