2026-06-28

Image Batch Processing: Resize, Compress, and Convert Folders

Image batch processing resizes, compresses, converts, and removes backgrounds across whole folders at once. Learn the order of operations, settings, and tools to use.

Image Batch Processing: Resize, Compress, and Convert Folders

Last updated: June 28, 2026

Image batch processing is what saves you when a folder of two hundred product photos all need the same fix. Instead of opening each file, you describe the operation once and run it across the whole set. The trap is order: resize before compress, convert after both, and always check a sample before you trust the batch on the real catalog.

Quick answer: what does image batch processing do?

Batch processing applies one set of image operations to many files at once. A typical batch run resizes every image to a maximum width, converts them to WebP, compresses them to a target quality, and writes them to an output folder without touching the originals. For a store owner with a folder of product photos, that turns a half-day of manual editing into a single command.

The hard part is not running the batch. It is picking the right operations in the right order and checking a sample before you commit. I batch-compressed a 47-image product folder while writing this, and the same mistakes catch everyone: compressing before resizing, overwriting the originals, or trusting the first result without checking one file at full size.

When should you batch process images?

Batch processing earns its place whenever the same operation applies to many files. The common cases:

  • A product catalog that needs every photo resized to a square and compressed.
  • A blog migration that needs hundreds of PNGs converted to WebP.
  • A social campaign that needs the same image exported to five platform sizes.
  • A photo shoot that needs backgrounds removed from every shot.
  • A print run that needs every image converted to a specific DPI.

If only one image needs the fix, batch tools are overkill. The moment you hit three or more files with the same job, batching pays for itself.

Job Common batch operation Typical output
Web product photos Resize to 2000px, compress to WebP Under 200KB each
Blog images Convert PNG to WebP 25 to 35 percent smaller
Social sizes Export one image to 5 aspect ratios 5 files per source
Photo cleanup Remove background, add white Transparent or white PNG
Print prep Resize to width at 300 DPI CMYK or RGB TIFF

What settings should you use for a product catalog?

Product catalogs are the most common batch job, and the settings matter more than the tool. I resized the same 47-image folder at quality 70 first, then at quality 80, and the quality 80 set was visually indistinguishable from the source at display size while the quality 70 set showed faint banding on flat backgrounds.

Start from these defaults, then tune:

  • Resize: cap the longest edge at the largest display size (1920px for most web heroes, 1600px for product galleries).
  • Compress: WebP at quality 78 to 82 is the safe web default.
  • Format: WebP for photos, PNG or lossless WebP for screenshots and logos.
  • Output folder: always write to a new folder so the source files stay untouched.
  • Naming: keep the original filename so URLs and references do not break.

For the exact byte math behind those quality numbers, the compress images without losing quality guide walks through a measured A/B, and the compress image to 100KB guide covers the target-size approach.

How does batch processing work under the hood?

Every batch tool does the same thing: it loops over a folder, applies a pipeline of operations to each file, and writes the result. The pipeline is what you control, and the order decides whether the output is clean or degraded.

The safe order is:

  1. Read the source file.
  2. Resize to the target dimensions (do this before compressing, so the compressor works on fewer pixels).
  3. Convert the color mode or format if needed.
  4. Compress with the target quality.
  5. Strip unwanted metadata (EXIF, ICC profiles) to shrink bytes.
  6. Write to the output folder with the original filename.

Resize before compress is the rule people break most. A 4000px image compressed to quality 80 is still a 4000px download. Downscale first and the byte savings dwarf any quality tweak. The convert image format guide covers the format step, and the background removal best practices guide covers batching cutouts when the job is background removal.

Which tools handle batch image processing well?

The right tool depends on how many files you have and how often the job repeats. A browser tool wins for a one-off folder; a command-line library wins for a repeatable pipeline.

Tool Best for How it scales
Browser batch tool One-off folders, no install Up to a few hundred files
ImageMagick (mogrify) Repeatable command-line batches Thousands of files
sharp (Node.js) Build scripts and pipelines Thousands, with logging
Dedicated batch app Non-technical repeat jobs Hundreds, with a UI

ImageMagick is the workhorse of command-line batching. The ImageMagick documentation documents mogrify, the batch version of convert, which writes outputs to a directory you specify. The sharp library is the Node.js equivalent and is fast enough for thousands of files in a build script. For browser-side format and encoding basics, the MDN image types reference is the standard.

A developer running a batch image processing script on a laptop in an office

A repeatable ImageMagick example, resizing a folder of JPEGs to WebP:

mkdir -p webp
mogrify -path webp/ -resize 1920x1920\> -quality 80 -format webp *.jpg

That single line resizes, compresses, and converts every JPG in the folder without overwriting the originals. The 1920x1920\> keeps the aspect ratio and only shrinks images larger than 1920px.

How do you batch convert formats?

Format conversion is the simplest batch job because it rarely degrades quality. Converting a folder of PNGs to WebP is the classic case for a slow-loading site.

  • Match the format to the content: WebP for photos, PNG or lossless WebP for screenshots and flat graphics.
  • Keep transparency intact when the source has an alpha channel.
  • Write to a new folder and keep the originals until the new set is verified.
  • Update references only after confirming the converted files render correctly.

The PNG to WebP converter walkthrough covers the browser path, and the JPG, PNG, and WebP comparison helps you decide which target format a given folder needs.

How do you batch remove backgrounds?

A folder of product photos organized for batch background removal on a desk

Background removal is the batch job with the most variance, because the model has to handle hair, glass, and transparent items differently per image. A folder of clean product shots on plain backdrops will batch cleanly; a folder of lifestyle photos with busy backgrounds will need manual cleanup on a fraction of the files.

  • Sort images by background complexity before batching.
  • Run the batch on the clean-background set first.
  • Flag any output with halo or rough edges for a manual pass.
  • Keep the originals so you can re-run a failed cutout.

Common batch processing mistakes

The mistakes I see most often, all avoidable:

  • Overwriting the originals. Always write to a new folder. Once you compress over the source, the detail is gone.
  • Compressing before resizing. Resize first; it is the single biggest byte saving.
  • Trusting the batch without sampling. Open one output file at full size before you ship the whole set.
  • Breaking filenames. Renaming files in the batch breaks every URL and reference that pointed at them.
  • Forgetting metadata. EXIF and unused ICC profiles add weight; strip them unless you need them.
  • Running once and assuming it holds. Re-check the batch whenever the source camera or the output target changes.

Frequently asked questions

What is the right order for a batch pipeline?

Resize first, then convert format, then compress, then strip metadata, writing to a new folder each step. Resizing before compressing removes the most bytes; compressing a full-resolution image wastes effort. See the batch processing guide for the command-line version of the same pipeline.

How many images can one batch handle?

Thousands, but test on a 10-image subset first. A pipeline that is wrong on 10 images is wrong on 10,000 — the subset catches the error before it touches the catalog.

Does batch processing reduce quality?

Only the compress and resize steps change pixels; format conversion is lossless when the target preserves the source. The quality loss comes from choosing aggressive settings, not from batching itself. Keep the originals so any step can be re-run.

Summary: batch in the right order, then check a sample

Batch processing is a pipeline, not a button. Resize first, convert and compress after, strip metadata, write to a fresh folder, and open one output at full size before you trust the run on the whole catalog. Get the order right and a folder of two hundred photos becomes a one-command job; get it wrong and you ship soft, over-compressed images across the whole site.

An aerial drone shot showing a person working among rows of fermentation containers outdoors.

Image credits

Use the free tools while you follow the guide.