macOS pbcopy Can't Handle Images — So I Built a Fix
If you've ever tried piping an image into pbcopy , you know the pain: it silently mangles the data, and Cmd+V pastes garbage. That's because pbcopy is text-only by design — it has no concept of image data on the clipboard. I wanted a drop-in replacement that Just Works with images, so I built xpbc (eXtended PasteBoard Copy). chigichan24 / xpbc eXtended PasteBoard Copy — a drop-in enhancement for macOS pbcopy that supports images. xpbc eXtended PasteBoard Copy — a drop-in enhancement for macOS pbcopy that supports images. pbcopy only handles text. xpbc automatically detects whether stdin contains image data and copies it to the clipboard as an image. For plain text, it behaves exactly like pbcopy . Quick Start # Copy an image to the clipboard cat screenshot.png | xpbc # Copy text (same as pbcopy) echo " hello " | xpbc # Paste with Cmd+V in any app Installation Installer script curl -fsSL https://raw.githubusercontent.com/chigichan24/xpbc/main/Scripts/install.sh | bash To install to a cu
Continue reading on Dev.to Tutorial
Opens in a new tab


