Guide
Add a Compress Quick Action to Finder
A Finder Quick Action puts “compress these” in the right-click menu. You build one in Automator in about ten minutes: New Document → Quick Action, set the header to receive image files in Finder, drop in a Run Shell Script action, paste twelve lines of sips, save. It lands in ~/Library/Services/ and appears on right-click immediately.
The script below is the one we actually ran. It writes into a sibling Compressed folder rather than overwriting anything, never returns a file larger than the one you gave it, and handles filenames with spaces. On a 4,096 × 2,160 JPEG it took 3,398,183 bytes down to 289,061, a 91.5% reduction, in 1.29 seconds.
Measured on a MacBook Pro (M2 Pro, 16 GB) running macOS 27.0 build 26A428 on 26 September 2026. The Quick Action was built, registered, executed with automator(1), then deleted, and every plist key quoted below came from that bundle or from two Automator-built workflows already on the machine.
Where do Quick Actions live on disk?
A Quick Action is a folder with a .workflow extension and two files in it. There is no database, no registry, no signing requirement. macOS looks for them in three places:
| Location | Scope | What puts things there |
|---|---|---|
~/Library/Services/ | Just you | Automator when you save, and most apps that install one |
/Library/Services/ | Every user on the Mac | Admin installs, MDM |
SomeApp.app/Contents/Library/Services/ | Only while the app is installed | App bundles |
Inside one of them:
~/Library/Services/Compress Images.workflow/
└── Contents/
├── Info.plist # the menu item and what file types it accepts
└── document.wflow # the actions, in order, with their parametersInfo.plist is the part that decides whether your action shows up at all. The four keys that matter, read straight out of a working bundle:
| Key | Value | Effect |
|---|---|---|
NSMenuItem.default | "Compress Images" | The text in the right-click menu |
NSSendFileTypes | ["public.image"] | Shows only for images. Use public.item to accept anything |
NSRequiredContext | NSApplicationIdentifier: com.apple.finder | Finder only, not every app |
NSMessage | runWorkflowAsService | Run the workflow |
NSSendFileTypes is the one people get wrong. Set it to public.image and your action is invisible when a PDF is selected. Set it to public.item and it appears for everything, including folders, which is why your script needs to check what it was handed.
How do I build a compression Quick Action in Automator?
Open Automator (in Applications). Choose New Document, then Quick Action. At the top of the workflow pane set:
| Field | Set it to |
|---|---|
| Workflow receives current | image files |
| in | Finder |
| Image | anything you will recognize in a menu |
Search the action library for Run Shell Script and drag it in. Set Shell to /bin/zsh and, critically, set Pass input to as arguments. The default is to stdin, and with that default your file paths arrive on standard input where the script below will not see them. In the saved plist this is inputMethod: 1; Smol’s own Quick Action uses the same setting, which is a reasonable sanity check that it is the right one.
Paste this in. It is the exact script we ran.
#!/bin/zsh
# Compress each selected image into a sibling "Compressed" folder.
QUALITY=60
MAX_EDGE=2000
for f in "$@"; do
[[ -f "$f" ]] || continue
dir="${f:h}/Compressed"
mkdir -p "$dir"
base="${f:t:r}"
out="$dir/${base}.jpg"
n=2
while [[ -e "$out" ]]; do out="$dir/${base} $n.jpg"; ((n++)); done
if ! /usr/bin/sips -Z "$MAX_EDGE" -s format jpeg -s formatOptions "$QUALITY" \
"$f" --out "$out" >/dev/null 2>&1; then
continue
fi
# Never hand back a bigger file than we were given.
if [[ $(/usr/bin/stat -f%z "$out") -ge $(/usr/bin/stat -f%z "$f") ]]; then
/bin/rm -f "$out"
fi
doneSave it with a name you want to see in the menu. Automator writes it to ~/Library/Services/ and it is live.
Four things in that script are load-bearing.
"$@" with the quotes, not $* or $(cat). A Finder selection can contain Screenshot 2026-09-26 at 14.02.11.png, and unquoted expansion turns that into five broken arguments.
Absolute paths to every binary. A Quick Action does not inherit your shell’s PATH. /usr/bin/sips and /usr/bin/stat always resolve; a bare magick or cwebp from Homebrew will not. This is the single most common reason a script that works in Terminal does nothing from the context menu.
Output into a subfolder, not in place. The collision loop appends 2, 3 and so on, so running the action twice never overwrites the first result.
The size guard. sips defaults to JPEG quality 75, so an already-compressed image can come back larger — we measured a 157,425-byte file growing to 229,775 on a plain re-encode. When we ran the finished Quick Action over two files, the 3.4 MB original produced a 289,061-byte result and the already-small 157,425-byte file produced nothing at all, because the guard deleted the worse output. That is the behavior you want and almost no tutorial includes it. The full list of sips quality behaviors is in the sips command reference.
You can run a saved workflow from the command line, which is how the numbers above were taken: automator -i /path/to/file.jpg MyAction.workflow. Note that man automator documents a single -i; a Finder multi-select passes the whole list, but from the shell you loop.
| What was run | Time | Result |
|---|---|---|
| Quick Action, first invocation | 1.29 s | 3,398,183 → 289,061 B (−91.5%) |
| Quick Action, second invocation | 0.81 s | no output, size guard rejected it |
sips alone, same operation | 0.16 s | identical output |
The gap between 0.16 s and 0.81 s is Automator’s harness starting up. It is a fixed cost per invocation, not per file, so it disappears the moment you select fifty images instead of one.
Why does my Quick Action not show up?
In order of how often it is the cause:
The Services database has not noticed. Force it:
/System/Library/CoreServices/pbs -flush
# Confirm it registered — you should see the bundle path
/System/Library/CoreServices/pbs -dump_pboard | grep "Compress Images"That grep printed NSBundlePath = "/Users/…/Library/Services/Compress Images.workflow" for our test action, which is the definitive “yes, macOS can see it” check.
The file type does not match. If NSSendFileTypes is public.image and you selected a PDF, there is nothing wrong — the action is correctly hidden. Change it to public.item if you want one action for everything.
It is switched off. Open System Settings → Keyboard → Keyboard Shortcuts… → Services and look under Files and Folders. Every Quick Action on the machine is listed there with a checkbox, and an unchecked one never appears in a menu no matter how correct the plist is.
You are looking in the wrong submenu. Finder shows the first few Quick Actions inline on right-click and hides the rest behind Quick Actions → Customize…. With a dozen installed, yours may simply be below the fold.
How do I manage or remove a Quick Action?
Removal is deleting a folder. There is no uninstaller and nothing else to clean up.
# Remove one
rm -rf ~/Library/Services/"Compress Images.workflow"
/System/Library/CoreServices/pbs -flush
# See what you have
ls ~/Library/Services /Library/ServicesIf you want it out of the menu but not off the disk, uncheck it in System Settings → Keyboard → Keyboard Shortcuts… → Services instead. That pane is also where you assign a keyboard shortcut, which turns a right-click, hover, submenu, click into one keystroke.
To edit one, double-click the .workflow bundle and it opens in Automator. Changes take effect on save; no flush needed for an edit, only for an add or a delete.
How do I install Smol’s Quick Action?
One toggle in the app, and it installs the same kind of bundle in the same place. Ours is at ~/Library/Services/Compress with smol.workflow with CFBundleIdentifier: com.smol.quickaction, a menu item of Compress with smol, and NSSendFileTypes: ["public.item"] so it appears for images, PDFs, video and audio alike rather than only for photos.
It is one Run Shell Script action, exactly like the one you just built. The difference is what the script does: it reads ~/Library/Application Support/smol/settings.json at run time and uses whatever preset you last configured in the app, rather than hard-coding a quality number into the workflow. Change the app’s image quality and the Quick Action changes with it, with no Automator editing. It also prepends /Applications/Smol.app/Contents/Resources/binaries to PATH, so it reaches the bundled encoders instead of depending on Homebrew being installed.
Because Smol exposes its whole surface over an MCP server, an AI coding agent can check and change this without touching Finder at all. Asking one to report the state returned {"installed": true} on this machine, and install and uninstall are single tool calls. That matters less for a one-time setup than it does for reproducing a machine, which is the honest use case.
When Automator is the right answer
Almost always, if you can write twelve lines of shell. The script above is free, has no dependencies, works offline, survives OS upgrades, and you can read every line of it. If you want a right-click that resizes screenshots to 1,200 px before you paste them into a ticket, build it and never think about it again. We would rather you did that than paid us $29 for it.
Automator also wins when the recipe is yours. Strip metadata, then resize, then rename with a date prefix, then move to a dated folder, then post a webhook. No compression app is going to ship your exact pipeline. A shell script will run it.
Where a Quick Action gets thin:
Progress and cancellation. Select 400 photos and Automator gives you a small gear in the menu bar. There is no count, no per-file result, and Control-period leaves whatever sips was mid-write on disk.
Mixed file types in one selection. Handling images, PDFs, MP4s and WAVs in one script means four branches, four tools and four sets of quality flags. Doable, tedious, and easy to get subtly wrong.
Knowing what happened. A shell loop tells you nothing about which of your 400 files refused to shrink. You find out weeks later when one folder is still 2 GB.
Formats sips cannot write. WebP is readable but not writable, so a sips-based Quick Action cannot produce it at all.
That is the trade Smol’s one-time $29 buys: a queue with real progress, cancellation that leaves finished work finished, per-file results, mixed input types in a single drop, and AVIF and WebP as first-class outputs. If a right-click that runs sips covers your work, use the right-click.
For the batch-resize variant of this, including the destructive default in Automator’s own image actions, see batch resizing images with Automator. To skip the right-click entirely, a folder that compresses on drop is usually the better ergonomic. The PDF equivalent, with the Quartz filter and Ghostscript timings, is in batch compressing PDFs on a Mac. And if the images in question are going into a repository, a pre-commit hook catches them earlier than any Finder menu can.
Frequently asked questions
How do I add a compress option to the Mac right-click menu?
Build a Quick Action. Open Automator, choose New Document then Quick Action, set the workflow to receive image files in Finder, add a Run Shell Script action with Pass input set to as arguments, and paste a short sips loop. Save it and the name you chose appears under Quick Actions when you right-click a selection in Finder.
Where are Quick Actions stored on a Mac?
In ~/Library/Services/ for your user account, /Library/Services/ for every user on the machine, and inside app bundles at SomeApp.app/Contents/Library/Services/. Each one is a .workflow folder containing Contents/Info.plist, which declares the menu item and accepted file types, and Contents/document.wflow, which holds the actions.
How do I delete a Quick Action?
Delete the .workflow folder, then run /System/Library/CoreServices/pbs -flush so the Services database notices. To hide one without deleting it, uncheck it in System Settings, Keyboard, Keyboard Shortcuts, Services, under Files and Folders. That pane is also where you can give a Quick Action a keyboard shortcut.
Why is my Automator Quick Action not appearing in Finder?
Four usual causes. The Services database has not refreshed, so run pbs -flush. NSSendFileTypes does not match the selection, so an image-only action stays hidden for PDFs. The action is unchecked in Keyboard Shortcuts under Services. Or it is pushed below the visible few into the Quick Actions submenu. Confirm registration with pbs -dump_pboard and grep for the name.
Why does my Quick Action script work in Terminal but not from Finder?
Almost always PATH. A Quick Action does not inherit your shell environment, so a bare call to magick, cwebp or gs fails silently while /usr/bin/sips works. Use absolute paths to every binary. The second most common cause is leaving Pass input on to stdin instead of as arguments, which means the file paths never reach "$@".
Can a Quick Action make my file bigger?
Yes, if you do not guard against it. sips defaults to JPEG quality 75, so re-encoding an image already saved at a lower quality inflates it. We measured a 157,425 byte file growing to 229,775 bytes on a plain re-encode. Compare output size to input size with stat -f%z and delete the result when it is not smaller.
Keep reading
Guide
The sips Command: macOS’s Built-In Image Tool
Guide
Batch Resize Images in Automator Without Destroying the Originals
Guide
Watch a Folder and Compress Everything That Lands In It
Guide
Batch Compress PDFs on Mac (100 Files, One Drop)
Guide
Compress Images Before You Commit Them, Because Git Never Forgets