Remove Image Backgrounds on Mac in Batch (Shortcuts, Link)
Remove backgrounds from a whole folder of images on a Mac: a built-in Shortcuts loop, or Gizmojar's batch drop, gizmojar:// link and Shortcuts action.
Updated 6 min read
On this page
You have a folder of product shots or portraits and want the background gone from every one. Finder's Remove Background Quick Action works on selected images, but it has no command-line form, so people who want to script it end up asking how to batch a custom Shortcut over *.jpg.
Why batch background removal is awkward on a Mac
- The Quick Action is a Finder feature. It acts on the files you select. Terminal has no direct way to call it.
shortcuts runtakes one input at a time in practice. A glob like/path/*.jpgis expanded by your shell into many arguments, so a loop that runs the shortcut once per file is the safer pattern.- Where results go is up to you. A homemade Shortcut saves or returns files only if you add actions that do it.
- Preview's Instant Alpha is manual. People report that it misses pixels on complex edges and needs many passes per image, which does not scale to a folder.
Option 1: A Shortcut and a Terminal loop (built in)
Use this if you only need a folder processed and don't want another app.
- Open the Shortcuts app and create a new shortcut named
Remove Background. - Add Apple's background-removal action. Search the action list for "background"; the exact label can differ between macOS versions.
- Set the shortcut to accept images as input, and add an action that saves or returns the result.
- Open Terminal and run a loop over your files:
for f in ~/Pictures/batch/*.jpg; do shortcuts run "Remove Background" -i "$f"; doneThis runs the shortcut once per JPEG in ~/Pictures/batch. The loop changes nothing itself; the output location depends on the actions from step 3. Run shortcuts help run to see which options your macOS version supports, including how to pass an output path.
The trade-off: you build and maintain the shortcut, and you decide where results go.
Option 2: Gizmojar Remove Background
Gizmojar's Remove Background tool uses Apple's Vision framework on your Mac and writes <name> (no background).png. Nothing is uploaded. Originals are not changed.
Run it on a batch from the app
- Open the command bar with ⌃⌥Space (Control-Option-Space), the default shortcut.
- Drop your images, or a whole folder, onto the jar. Folders are scanned recursively; only video, audio, image and PDF files are added.
- Press ⌘5 to open the On-device AI drawer, or type "remove background" in the search field. The acronym "rb" also matches.
- Choose Remove Background and press ↵.
More than 24 files, or any folder, opens the batch list. It shows per-file status and a Failed filter, and failed rows can be retried before saving.
Run it from Terminal with a link
Gizmojar handles gizmojar:// links without opening a window. Send one with open:
open "gizmojar://run?tool=removebackground&path=/Users/you/Pictures/a.jpg&path=/Users/you/Pictures/b.jpg"This runs Remove Background on both files. Paths can be absolute or start with ~/, separated by | or repeated as path=. Add &show=1 to run it in the command bar instead.
To build the link from a folder, use a loop. It assumes file names without spaces or characters such as & and #; otherwise URL-encode them (a space is %20).
url="gizmojar://run?tool=removebackground"
for f in ~/Pictures/batch/*.jpg; do url+="&path=$f"; done
open "$url"Gizmojar shows a toast with the outcome. For a very large folder, dropping it on the command bar is easier than one long link.
Run it from Shortcuts
- In Shortcuts, add the Run Gizmojar Tool action.
- Set Files to your image input, for example the output of a Get Contents of Folder action.
- Set Tool to Remove Background if it appears in the Tool list. If your version doesn't list it, use the link method above.
The action returns the result files, so you can pass them to the next step. If Gizmojar is handed files as data, it writes them to ~/Library/Caches/Gizmojar/Shortcuts/<id>/ and puts results next to them.
Which method fits
| Method | Best for | Output location | Needs |
|---|---|---|---|
Own Shortcut plus shortcuts run | One-off folders, no extra app | Whatever your actions do | Building the shortcut |
| Gizmojar command bar | Big batches with status and retry | Next to originals, or a chosen folder | Trial or license |
gizmojar:// link | Scripts, launchers, Terminal | Same rules as the app | Trial or license |
| Run Gizmojar Tool action | Larger Shortcuts workflows | Returned to the next action | Trial or license |
Where results go
| Setting | Behavior | Default |
|---|---|---|
| Save results to: | Same folder as the original, or a chosen folder | Same folder |
| Save results only when the whole batch succeeds | Results are staged and published together | On |
| Put batches with several results in a dated folder | Several results land in a dated folder | On |
These are under Settings ▸ General. If part of a batch fails you see "N failed, so nothing was saved. Keep the M that worked?" with Keep M or Discard. After saving, Undo moves the results to the Trash.
Limits
- If Vision finds no subject, that file fails with "No subject found in this image."
- Output is PNG only; this tool has no other output format.
- Gizmojar has no command-line tool of its own. Terminal use goes through
open "gizmojar://…".
Checklist before you try again
- The paths are absolute (or start with
~/) and the files exist. - Special characters in file names are URL-encoded.
- Only parameters that apply to Remove Background are in the link.
- Any Keep/Discard banner from a previous batch is resolved.
- The trial is active or a key is entered via Enter License….
If something doesn't work
- Nothing happens when you run the link: add
show=1to see any toast. A missing path shows "No files given — add path=/full/path/to/file." - "Unknown parameter": remove the option that doesn't apply to Remove Background.
- Some files fail: retry them from the batch list before saving.
- Nothing saved after a partial failure: choose Keep M or Discard first; new drops are blocked until you do.
If it still fails, contact support at macsuite.app/support with this:
Subject: Gizmojar Remove Background batch not running
Gizmojar version: (from About Gizmojar)
macOS version:
Method: command bar / gizmojar:// link / Shortcuts action
Exact link or action settings:
Toast or error text shown:
Number of files and format (JPG, HEIC, PNG):
Steps already tried:Common questions
Can I keep the original file format instead of PNG?
No. Remove Background writes a PNG so the transparency survives. Convert the PNG afterwards with the image Convert tool if you need another format that supports transparency.
Does it upload my images?
No. Subject detection runs on your Mac with Apple's Vision framework, and the app does not send your files anywhere.
Will it overwrite my originals?
No. Results are new files named <name> (no background).png, and the originals are not changed.
Can I include it in a multi-step recipe?
Recipes are covered in Recipes. For link and Shortcuts details, see Shortcuts and gizmojar:// links.
Gizmojar and the rest of the toolbox
Gizmojar is part of MacSuite, and it covers more than this one tool. See On-device AI: transcribe, OCR, backgrounds, QR, Where results are saved (and Undo) and Ways to add files. You can try it free for 7 days.