DEV Community

吴美良
吴美良

Posted on

# Batch Compress Images Without Uploading Them: A Privacy-First Workflow

"Free online image compressor" is one of the most loaded phrases on the internet. A surprising number of those tools make their money not by charging you, but by keeping a copy of every image you "compress" — photos of your ID, your family, your product mockups — on their servers.

You don't have to make that trade. Browser-side compression has been fast enough for years, and the workflow below runs entirely on your device.

The upload test

Before you trust any compressor with a real file, run this 15-second test:

  1. Open the tool.
  2. Turn off Wi-Fi / mobile data.
  3. Compress an image.

If it still works, the compression is happening locally in Web Workers — your files never left the device. If it stalls at "uploading…", close the tab.

The batch workflow

Here's the order of operations I use for a folder of images, from biggest win to smallest:

1. Resize first

Compressing a 4000×3000 photo without resizing is like dieting by wearing lighter shoes. Resize to the actual display size (or 2× for retina) and you'll often cut 70–90% of the weight before compression even starts. Use a batch resize step if the whole folder is oversized.

2. Compress in batch

Drop the whole folder into a batch image compressor and let it process up to 30 files at once. For specific formats there are dedicated pages — PNG, JPEG, and GIF — each tuned for that format's codec.

3. Strip metadata

Every phone photo carries EXIF data: GPS coordinates, device model, timestamp, sometimes a thumbnail. It's dead weight (10–50 KB each) and a genuine privacy leak if you publish originals. Strip EXIF before anything goes live.

4. Download as one ZIP

Good batch tools let you pull everything back down as a single ZIP rather than clicking download 30 times.

Why "no upload" matters beyond privacy

It's also faster. There's no round-trip to a server and back — the processing starts the instant the file hits your browser. On a slow connection or a big batch, that's the difference between seconds and minutes.

Top comments (0)