Intro
On a Mac, you can batch-compress images from a right-click menu, with solid results. Everything runs locally—no uploads, no paywall.
The setup uses built-in Shortcuts plus a tiny open-source CLI. Here’s how to put it together.
Install the open-source tool
First, install slimdeer, a ~7 MB open-source command-line image compressor. I found it while hunting for a better local Mac compression workflow, and it clicked immediately.
It’s CLI-only, and Homebrew installs it in one line:
brew install heydeer/tap/slimdeerHomebrew is a popular package manager for Mac. If you haven’t used it yet, search for a quick install guide—there are plenty.
Once installed, slimdeer can keep the original format (JPG, PNG, and so on) or convert to WebP.
WebP is another image format, similar to JPG and PNG. At comparable visual quality, files are often about 25%–35% smaller than JPG, which makes it a good fit for blogs, websites, and social posts.
Set up the Shortcuts
Next, create two Shortcuts: one that compresses in the original format, and one that outputs WebP.
Open the Shortcuts app and create a new Shortcut.
On the create screen, open Info and enable “Use as Quick Action.” A starting action appears on the left automatically.
Set the receive type to Files, and choose “No Input.”
In the Actions library on the right, find Terminal and drag in “Run Shell Script.”
Paste this into the script box:
export PATH="/opt/homebrew/bin:$PATH"slimdeer "$@"You can also copy it straight from this post.
Then set the Shell to Bash, and change “Pass Input” to “as arguments.”
That’s the “Compress Images” Shortcut.
Duplicate it, rename the copy to something like “Compress to WebP,” and swap the script for:
export PATH="/opt/homebrew/bin:$PATH"slimdeer "$@" --format webpIf you prefer not to build them by hand, you can also import the shared Shortcuts from this post into the Shortcuts app on your Mac.
Compress Images Shortcut
Compress to WebP Shortcut
Add them to the right-click menu
Pick any image file, right-click, and open Quick Actions. You may not see the new compress actions yet.
Choose Customize at the bottom, then enable the Shortcuts you just created in the Finder Extensions pane.
After that, right-click one or more images in Finder and compress them in one click. Multi-select works the same way, so batch jobs are easy.
The compression quality is surprisingly strong—files shrink a lot while looking fine for everyday use.
Wrap-up
That’s my Mac image-compression setup with Shortcuts: local, free, and good enough for most of my day-to-day needs.
If this helped, a like and a follow go a long way. I’ll keep sharing more Mac productivity workflows.