Skip to content

v0.5.0 - WSL2 Image Paste Plugin

Choose a tag to compare

@Zate Zate released this 16 Feb 04:07
· 128 commits to main since this release

New Plugin: wsl-clipboard-fix v1.0.0

Fixes image pasting in Claude Code on WSL2.

The Problem

Claude Code's Linux clipboard detection checks for image/png, image/jpeg, etc., but Windows copies images as image/bmp by default. WSLg forwards this format unchanged via Wayland, so Claude Code never detects clipboard images on WSL2.

The Fix

This plugin runs a background clip2png daemon that:

  • Polls the Wayland clipboard every 2 seconds
  • Detects BMP image content and converts it to PNG via ImageMagick
  • Writes the PNG back to the clipboard so Claude Code can detect it
  • Starts/stops automatically with Claude Code sessions via hooks
  • Silently does nothing on non-WSL systems

Requirements

  • WSL2 with WSLg (Windows 11)
  • sudo apt install wl-clipboard imagemagick

Installation

/plugin marketplace add Zate/cc-plugins
/plugin install wsl-clipboard-fix

Keybinding (Recommended)

Since Windows Terminal intercepts Ctrl+V, add to ~/.claude/keybindings.json:

{
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "alt+v": "chat:imagePaste"
      }
    }
  ]
}

Related Issues