How to compress photos on a Mac and replace the originals, with a way to undo

Short answer

The free way is the built-in sips command in Terminal, which resizes or recompresses photos in place, but it overwrites the originals with no undo, so copy the folder first; Preview's Export does one photo at a time and saves a new file. SendSize has an output setting called Replace the originals: the smaller photos take the originals' place with the same names and dates, the originals go to the Trash, and Undo: Put Originals Back restores them in one click.

Compress in place, with a way back Any use + Replace the originals

Why replace instead of keeping both

Making smaller copies is the safe default, but for a library of photos you want to keep, two copies of everything uses more space than before. Replacing the originals frees the space, keeps the folder structure and names that other apps and backups expect, and saves you from deleting the originals by hand afterwards.

Free: sips in Terminal (no undo)

sips comes with macOS and is fast. It does not look into subfolders, does not tell you which files got bigger, and it cannot put anything back, which is why the copy in step 1 matters.

  1. Duplicate the folder first (select it in Finder, press Command-D). sips writes over the files you give it.
  2. Open Terminal and type cd followed by a space, then drag the folder onto the Terminal window and press Return.
  3. To make every JPEG at most 2000 pixels on the long side, run sips -Z 2000 *.jpg.
  4. To recompress JPEGs at a lower quality without changing their size in pixels, run for f in *.jpg; do sips -s formatOptions 70 "$f" --out "$f"; done.

With SendSize: Replace the originals

  1. Open Advanced at the bottom of the list of uses, and under Output choose Replace the originals. The same setting is in Settings → Output. The first time, SendSize explains what will happen.
  2. Pick a use. Compress keeps photos looking the same and makes them smaller; Save space keeps each file's format; HEIC to JPG turns iPhone photos into JPGs (they keep their name with .jpg at the end).
  3. Drop in the photos or the folder, subfolders included.
  4. Each smaller photo goes back where the original was, with the same name and the original's created and modified dates. The original goes to the Trash. A photo that would not get smaller is left exactly as it was and stays out of the Trash.

Changed your mind?

  • Right away: in the results, open Again or Undo and choose Undo: Put Originals Back. The results are removed and every original moves from the Trash back to its place, with its dates.
  • Later, after quitting the app: open the Trash in Finder, select the originals and choose Put Back.
  • Again or Undo → Compress Again For runs the same photos again with another use, starting from the originals.
  • Check before you empty the Trash: click a result to compare it with the original, and drag the divider over faces, text and dark areas.

Running it again later

SendSize marks every file it writes. If you drop the same folder in again next month, the photos it already compressed are skipped and only new ones are done, so nothing is compressed twice. Compress Anyway in the results does them again if you really want to.

What to keep in mind

  • Undo in the app only knows the batches since you opened it. After quitting, use Put Back in the Trash, and only until the Trash is emptied.
  • Replace the originals is never used for watched folders or for sendsize:// links; those always make new files next to the originals.
  • Compressing removes some detail. For photos you might print large or edit later, keep the originals somewhere, such as a backup drive.
  • If the photos are in the Photos library, export them first; SendSize works on files in Finder, not inside the Photos library.

Questions

Can I compress photos on a Mac without making copies?

Yes. sips in Terminal does it in place without undo; SendSize does it with Replace the originals and moves the originals to the Trash, so you can put them back.

Do the photos keep their names and dates?

With SendSize, yes: same name (a new extension only if the format changed, such as HEIC to JPG), the original created and modified dates, and the date taken inside the file.

How do I get the originals back?

Click Again or Undo → Undo: Put Originals Back in the results, or use Put Back on the originals in the Trash.

Is Replace the originals a paid feature?

No. It is free; the free version handles 5 files at a time, and the $19.99 license removes that limit.

Do it with SendSize

Compress in place, with a way back

PresetAny use + Replace the originals

  1. Under Advanced → Output, choose Replace the originals.
  2. Pick a use and drop in the photos or the folder.
  3. Check a few with the before-and-after slider. Changed your mind? Again or Undo → Undo: Put Originals Back.

Free for 5 files at a time. $19.99 once for any number, on 3 Macs.