Save Images From Your Clipboard to Disk

Taking screenshots is a common task when working on an engineering team. Sharing in-progress work, showing bugs or needed changes, or finding design inspiration from another web app. While often you just want to send a message with the screenshot, sometimes it’s helpful to save them to disk for later use.

For quite a while now, my solution was a combination of Shottr and pngpaste. Shottr is an amazing macOS screenshot app with features including comments, adding arrows and shapes, showing measurements, blurring sensitive information, and so much more. pngpaste is a CLI tool that will save image contents from your clipboard to disk. Together, these tools are a match made in heaven.

Most of the time, I use Shottr in a purely copy/paste capacity meaning I take a screenshot, close Shottr which copies the image to my clipboard, then paste it in Slack to send it to a teammate. Simple, no leftover files on my system, just an awesome workflow. However, sometimes I want to save files to disk for later use, or to upload to my website with another CLI tool I built. This is when I use pngpaste which I not only can use manually, but also I can integrate it with other shell scripts.

I recently re-built pngpaste in Rust as the existing pngpaste project was messing up the background color of images. Feel free to take a look at the project on GitHub!

pngpaste output.png