Choosing a Batch Processing Method in GIMP: BIMP vs Script-Fu vs Python-Fu
Decision guide for automating image edits in GIMP 2.10.x. Compare BIMP, Script-Fu, and Python-Fu for headless batch operations, reproducibility, and scripting flexibility.
27 Nov 2025, 23:47 UTC

Resizing a handful of images in GIMP is straightforward. Resizing a catalog of two thousand product photos before a release is not. The decision is not whether to automate, but which automation path fits your constraints: a GUI-driven plugin, a Scheme script, or a Python extension.
Takeaway: If you need headless, repeatable batch jobs for CI, Script-Fu is the most portable choice. Use BIMP for quick GUI presets when you do not need version control. Use Python-Fu only when your logic depends on Python libraries that GIMP does not expose.
Constraints that narrow the choice
Before comparing tools, define the boundaries. The research brief for this guide assumes four constraints, and they pull in different directions:
- GIMP 2.10.x stable or later. BIMP compatibility with GIMP 3.0 development releases is uncertain; verify plugin availability before upgrading.
- Headless execution. The method must run without a display server for CI pipelines.
- Non-destructive preview. You want to inspect changes before writing files.
- Minimal dependencies. Avoid installing extra plugins unless the flexibility gain is necessary.
Only BIMP satisfies the preview constraint directly. Script-Fu and Python-Fu satisfy headless execution. If your pipeline requires both, you may need a hybrid approach: use BIMP interactively to design the transform, then reimplement it as a Script-Fu or Python-Fu script for CI.
Comparing BIMP, Script-Fu, and Python-Fu
| Method | Interface | Language | Headless support | Learning curve | Best for |
|---|---|---|---|---|---|
| BIMP | GUI plugin | None (presets) | Limited | Low | One-off presets, non-programmers |
| Script-Fu | Console / Scheme | Scheme | Native (gimp -b -) | Medium–High | Portable, repeatable scripts |
| Python-Fu | Console / Python | Python | Native (gimp -b -) | Medium | Complex logic, library reuse |
Trade-offs beyond the feature list
BIMP (Batch Image Manipulation Plugin) offers the fastest setup. You configure a preset through a dialog, apply it to a folder, and inspect the result. The trade-off is that presets live in the GUI, not in a text file you can review or version. Complex conditional logic—for example, “skip files under 100 KB”—is difficult or impossible. The research also flags that BIMP may not be compatible with GIMP 3.0 development releases, which makes it risky as a long-term CI dependency.
Script-Fu uses Scheme and GIMP's Procedural Database (PDB). It runs natively in batch mode with gimp -i -b, making it suitable for headless servers. Scripts are plain text, so they fit into Git and code review. The cost is Scheme syntax, which is unfamiliar to many developers, and the need to avoid GUI-only PDB calls when running headless.
Python-Fu exposes the same PDB through Python. It is easier to debug and can import standard libraries, but it requires a working pygimp binding. Startup is slightly slower, and the dependency footprint is larger than a standalone .scm file.
Implementing a headless Script-Fu resize
The following pattern illustrates how to structure a batch resize. Save it as resize.scm in your GIMP scripts directory.
(define (batch-resize pattern target-w target-h out-dir)
(let* ((files (cadr (file-glob pattern 0))))
(while (not (null? files))
(let* ((filename (car files))
(image (car (gimp-file-load RUN-NONINTERACTIVE
filename
filename)))
(drawable (car (gimp-image-get-active-layer image)))
(w (car (gimp-image-get-width image)))
(h (car (gimp-image-get-height image)))
(new-w (min target-w w))
(new-h (min target-h h)))
(gimp-image-scale image new-w new-h)
(let ((outfile (string-append out-dir
(car (last (strbreakup filename "/"))))))
(gimp-file-save RUN-NONINTERACTIVE
image
drawable
outfile
outfile))
(gimp-image-delete image))
(set! files (cdr files)))))
Run the batch from a terminal or shell session where GIMP is installed. You need read permission on the input directory and write permission on the output directory.
gimp -i -b '(batch-resize "input/*.png" 800 600 "output/")' -b '(gimp-quit 0)'
Replace input/*.png with your source glob, 800 and 600 with maximum dimensions, and output/ with the destination path. The -i flag runs without an interface; -b executes the batch call; the final -b '(gimp-quit 0)' exits cleanly.
Risk: If your script calls a GUI-only procedure—such as a dialog or display refresh—while running with -b, GIMP may crash or behave unpredictably. Stick to non-interactive PDB calls.
Validating the batch result
Do not assume the batch succeeded. Three practical checks apply across all three methods:
- File existence and dimensions. Confirm that files appear in the output directory and that their pixel dimensions match the target. You can use
fileoridentify(ImageMagick) from the terminal. - Console output. Run the batch and read the GIMP console. Warnings about missing fonts or unsupported color profiles are common; errors about PDB calls indicate a script bug.
- BIMP preset audit. If you use BIMP, load the preset, run it on a small test folder, and inspect that the generated files match the export settings—size, format, and compression—before scaling up.
Limitations and when to reconsider
No single method covers every scenario. BIMP is not a substitute for version-controlled automation. Script-Fu scripts are portable but require Scheme maintenance. Python-Fu adds power at the cost of a larger runtime dependency.
If your pipeline later moves to GIMP 3.0, re-verify BIMP compatibility before relying on it. For Script-Fu and Python-Fu, keep GUI calls out of batch mode and test on a representative sample before committing to a full run.
A conservative workflow is to start with a five-file test batch, inspect the output, then scale. That small check prevents silent failures in a release pipeline.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.