A Batch Image Compression Workflow That Stays Consistent

A batch job goes wrong when the settings are decided per file instead of per purpose. Fix the target first — group images by where they will be displayed, assign one preset to each group, resize and encode each file exactly once — and a hundred images come out consistent instead of a hundred small judgement calls. The steps below are the version of that process that survives contact with a real deadline.

Why batches drift

Compressing one image is a decision. Compressing eighty is a process, and processes fail in predictable ways: the fifth folder gets a different quality setting because someone was in a hurry, three images keep their 4000-pixel dimensions because they were skipped, two transparent logos get flattened onto white, and nobody can remember which files were already processed when the client asks for a change.

Four habits prevent almost all of it: a fixed set of presets, an untouched originals folder, one encode per file, and a written record of what was applied.

Step 1: sort by destination, not by file type

Group the images by the slot they will occupy. A gallery image and a thumbnail are not the same asset even if they show the same product, and treating them separately from the start avoids resizing twice later.

BucketLong edgeFormatQualityTypical budget
Hero / full-width1600 pxWebP80150–250 KB
In-article images1100 pxWebP8080–140 KB
Thumbnails / grids500 pxWebP7520–40 KB
Screenshots & diagrams1100 pxLossless WebP or PNGn/a60–200 KB
Email assets600 pxJPEG8040–70 KB
Archive / print mastersUnchangedKeep originaln/an/a

Write the table down before the batch. If a bucket is missing, add it deliberately rather than improvising mid-run — that is how the one 3200-pixel image ends up on the homepage.

Step 2: protect the originals

Copy the source files into a folder marked read-only, or at minimum into a folder you never export to. Every derivative is generated from that copy. This one rule makes the rest of the workflow reversible: if a preset turns out wrong, you re-run it instead of hunting for a better version of a file you already overwrote.

Name the working folder with the date, for example exports/2026-11-19/. When someone asks which files went live last month, the folder answers the question.

Step 3: resize and encode in a single pass

Do not export a resized JPEG, then run it through a compressor. Two lossy encodes from the same source cost more quality than one encode at a slightly lower setting. Scale and encode together, from the original, at the final dimensions.

The PixelPress compressor works that way: it decodes the source, draws it onto a canvas at the target size, and encodes once. Set the output format, the quality and the longest edge, then add the whole bucket. Every file in the batch gets the same treatment, which is precisely the consistency a manual one-by-one approach loses.

Step 4: work in chunks

Browsers hold decoded images in memory. A folder of forty 24-megapixel photos can briefly need well over a gigabyte, and on a laptop with other tabs open that is where a tab starts to feel sluggish. Two practical habits:

  • Process 20–40 files at a time, then clear the list before starting the next chunk.
  • Let the queue finish before clicking Download all; the tool processes sequentially for a reason.

Each result card shows the dimensions, the before-and-after size and the percentage saved, so an outlier is visible without opening every file. If one image shows a suspiciously small saving, look at it — it may already have been compressed, or it may have failed quietly.

Step 5: verify a sample, not the whole set

Checking eighty files individually is not realistic, and it is not necessary. Pick five from each bucket — the busiest photo, the one with text, the one with transparency, the largest file and a random one — and inspect them at 100%. What you are looking for:

  • Text and thin lines still sharp, especially in screenshots.
  • No blocky patches in skies, walls or soft gradients.
  • Transparency intact where it should be, white where it should be flattened.
  • Correct orientation, and dimensions matching the preset.
  • Colours unchanged from the original at a glance.

If two of five fail, the preset is wrong and the batch should be re-run. If one fails, it is usually content-specific and can be handled manually.

Step 6: record what you did

A five-line text file next to the exports saves an hour six months later:

2026-11-19 · hero: WebP q80, 1600 px · article: WebP q80, 1100 px · thumbs: WebP q75, 500 px · screenshots: lossless WebP, 1100 px · source: masters/2026-11-18

It also makes the next batch faster, because the presets are already decided and only the files change.

When to move to the command line

A browser workflow is the right tool for dozens of images and for anyone who does not want to install software. It stops being the right tool when the same job runs weekly, when the count reaches the thousands, or when the output must be reproducible in a build pipeline.

At that point, the same logic transfers to command-line encoders — resize, set quality, choose format, write to a dated output folder — wrapped in a short shell loop. The presets are identical; only the interface changes. Do not automate before the manual process is stable, or you will automate the wrong settings faster.

Failure modes to watch for

SymptomUsual causeFix
Files look softer than the last batchDouble compression from an already-exported fileRe-run from the master
Product appears on a white boxTransparent PNG flattened to JPEGRe-export as WebP with alpha
Portrait photos arrive sidewaysOrientation metadata dropped without being appliedRotate from the master, re-encode
Colours shift after uploadColour profile stripped or convertedExport sRGB, check in a browser
Two files overwrite each otherSame base name in different foldersAdopt a naming pattern with a variant suffix
Grid rows jump as images loadMixed aspect ratiosCrop all to the same ratio

A maintenance pass twice a year

Budgets and formats change slowly, but they do change. Every few months, take the largest twenty images on the site and check whether a newer format or a tighter preset would help. Delete derivatives that are no longer referenced — they cost nothing on a static host, but they confuse the next person who opens the folder. Keep exactly one master per image and let everything else be disposable.

FAQ

How many images can I compress at once in a browser?

Dozens comfortably, if they are reasonably sized. The limits are memory and patience rather than a hard cap: very large photos decode into a lot of pixels, so long batches of camera files are slower and heavier than batches of web-sized images. Work in chunks of 20–40.

Do I really need to keep the originals?

Yes, if you ever expect to change the preset, publish at a larger size, or use a better format. Compressed derivatives cannot be expanded back. One master folder costs disk space; losing the master costs a re-shoot.

Can this workflow handle PDFs or videos?

No. This tool decodes raster images only. PDFs and video need different pipelines with different tools; the sizing discipline is the same, but the encoder is not.

Written by the PixelPress team. Last updated November 19, 2026.

Related: product photo sizes for online stores →