SESSION 17 / 20 Export Workflow

Batch Processing

Getting files out of GIMP correctly and efficiently is the final step in every project — and the most error-prone. This session covers the full export pipeline: format-specific settings, file naming conventions, multi-format output, and automating it all so a folder of source files becomes a folder of finished deliverables in one run.

1h Session Length
+15m Review
4 Phases
💡
0:00 – 0:10  ·  ⏱ 10m
Concept Brief — Save vs Export, and Why the Difference Matters
▼

GIMP makes a hard distinction between saving and exporting. File → Save (and Save As) only writes .xcf files — GIMP's native format, which preserves every layer, path, channel, guide, and mask in full fidelity. File → Export As writes any other format: JPEG, PNG, TIFF, WebP, and so on. This distinction is intentional and important: it prevents accidentally overwriting a layered source file with a flattened export, which is a common and irreversible mistake in Photoshop workflows.

The 80/20 reality of export: most professional output falls into one of three scenarios — screen-optimised JPEG or WebP for the web, PNG for anything requiring transparency, and TIFF for print handoff. Each format has a small number of settings that meaningfully affect quality and file size; the rest are noise. This session covers exactly those settings, the correct file-naming conventions that prevent confusion across client handoffs, and the Script-Fu pipeline that generates all required output formats from a single source folder in one operation.

✅

Skill unlock: After this session you'll understand the critical export settings for every common format, be able to export all layers of a multi-layer document as individual files, and run a batch pipeline that produces JPEG, PNG, and WebP output from a single set of source files.

  • 01
    File → Export As vs File → Overwrite

    File → Export As opens the full export dialog each time, letting you choose filename, format, and format-specific options. File → Overwrite re-exports to the same path and filename used in the last Export As call, with the same settings, without any dialog. Use Export As the first time you export a file; use Overwrite (Shift+Ctrl+E on most platforms, or check Edit → Keyboard Shortcuts) for every subsequent export during the same session as you iterate on the design. The Overwrite command is the single biggest time-saver in a production export workflow — learn its keyboard shortcut and use it constantly.

    File → Export As (first export) · File → Overwrite (repeat export, same settings)
  • 02
    JPEG Export Settings — The Parameters That Matter

    When exporting as JPEG, the dialog presents many options. Only three are significant for most work. Quality: GIMP's JPEG quality scale runs 0–100. Quality 85 is the professional standard for screen delivery — it produces files roughly 40% smaller than Quality 95 with no perceptible quality difference at normal viewing distances. Quality 90–92 is appropriate for images with fine texture or print-destined JPEGs. Never use 100 — it is nearly lossless but produces file sizes 3–5× larger than Quality 85 for no visible gain. Subsampling: set to 4:2:0 for photographs, 4:4:4 for images with fine colour detail or text on coloured backgrounds. Progressive: enable this for web delivery — it allows the browser to display a low-resolution preview while the full image loads. Leave DCT, smoothing, and comment fields at their defaults.

    File → Export As → JPEG → Quality 85, Subsampling 4:2:0, Progressive enabled
  • 03
    PNG Export Settings — Compression vs Compatibility

    PNG is lossless — quality is always perfect. The only meaningful setting is Compression, which runs 0–9 and controls how aggressively the file is compressed. Compression affects file size and encoding time, not image quality. Compression 6 is the default and the right choice for almost all output — it produces near-maximum compression with reasonable encoding speed. Compression 9 produces marginally smaller files but takes significantly longer and is rarely worth it. Compression 0 produces large files instantly — useful only during rapid iteration when you are re-exporting hundreds of times and file size is irrelevant. For PNG output with transparency, confirm that Save background colour is unchecked and Save transparency is checked. Interlacing (Adam7) can be enabled for web delivery but adds file size; leave it off for most PNG output.

    File → Export As → PNG → Compression 6, Save transparency enabled
  • 04
    WebP Export — The Modern Default for Web

    WebP is now supported by all major browsers and produces files 25–35% smaller than equivalent JPEG at the same perceived quality. GIMP 3.x exports WebP natively via File → Export As → select WebP from the format dropdown (or name the file with a .webp extension). Key settings: Quality runs 0–100 identically to JPEG — use 82–87 for the web equivalent of JPEG 85. Lossless: enable only for images with large flat-colour areas (icons, illustrations, logos) — for photographs, lossy WebP is always more efficient. Metadata: strip all metadata (Exif, XMP, IPTC) for web delivery to reduce file size and avoid accidentally sharing location data embedded in camera photographs. In Script-Fu, use file-webp-save with the same run-mode, image, and drawable arguments as other save procedures.

    File → Export As → name file .webp → Quality 85, Lossless off, strip metadata
  • 05
    TIFF Export for Print Handoff

    TIFF is the standard format for sending images to print vendors, prepress operators, and other applications that need uncompressed or losslessly-compressed pixel data. In GIMP's TIFF export dialog, the critical settings are: Compression — choose None for maximum compatibility with print workflows (some prepress RIPs cannot decompress LZW or ZIP TIFF files), or LZW for lossless compression that all modern applications handle. Save layers: leave unchecked — most print applications cannot handle multi-layer TIFFs and will either error or flatten them unpredictably. Flatten the image in GIMP first (Image → Flatten Image) before TIFF export. Bit depth: GIMP defaults to 8 bits per channel. If your source is a 16-bit image (imported from a raw converter), export as 16-bit TIFF to preserve the full tonal range for print. Session 19 covers the complete print export workflow including colour profiles and soft proofing.

    Image → Flatten Image → File → Export As → TIFF → Compression: None
  • 06
    File Naming Conventions That Prevent Errors

    File naming is invisible until it causes a problem — and then it causes a large one. Adopt these conventions for every project: use only lowercase letters, numbers, and hyphens in filenames — no spaces, no underscores, no special characters (hero-image-v2.jpg not Hero Image V2 FINAL.jpg). Include a size or variant suffix when exporting multiple versions (product-shot-800w.jpg, product-shot-1600w.jpg). Use a version indicator during iteration (-v1, -v2) and a -final suffix only once — never -final-FINAL or -final2. Separate source files from export files in your folder structure: /source/ for .xcf files, /export/ for deliverables. Never save exports into the same folder as source files.

    Convention: lowercase-with-hyphens, size suffix, version indicator, separate source/export folders
  • 07
    Export All Layers as Individual Files with Script-Fu

    A common production task: a multi-layer GIMP document where each layer represents a different colour variant, language version, or animation frame that must be exported as a separate PNG. The Script-Fu procedure gimp-image-get-layers returns all layer IDs in the current image. Iterate over them, make each layer the only visible one, flatten a copy, and export it using the layer name as the filename. This approach exports 20 variants from a 20-layer document in seconds.

    ; Export every layer as a separate PNG named after the layer (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE "/path/source.xcf" "source.xcf"))) (layers (gimp-image-get-layers image))) (for-each (lambda (layer-id) (let* ((layer-name (car (gimp-item-get-name layer-id))) (flat-image (car (gimp-image-duplicate image))) (flat-layers (gimp-image-get-layers flat-image))) ; Hide all layers in the duplicate, then show only the target (for-each (lambda (l) (gimp-item-set-visible l FALSE)) (vector->list (cadr flat-layers))) (gimp-item-set-visible (vector-ref (cadr (gimp-image-get-layers flat-image)) (- (vector-length (cadr layers)) (+ 1 (vector-ref (cadr layers) (list-index (vector->list (cadr layers)) layer-id))))) TRUE) (gimp-image-flatten flat-image) (file-png-save RUN-NONINTERACTIVE flat-image (car (gimp-image-get-active-drawable flat-image)) (string-append "/path/output/" layer-name ".png") layer-name 0 6 1 1 1 1 1) (gimp-image-delete flat-image))) (vector->list (cadr layers))) (gimp-image-delete image))
  • 08
    Multi-Format Output from a Single Batch Loop

    When a project requires the same images delivered in multiple formats — a common client requirement — a single Script-Fu loop can produce JPEG, PNG, and WebP versions of every source file in one pass. Load each source file once, apply all edits once, then call the relevant save procedure three times before deleting the image from memory. This is significantly faster than running three separate batch operations and eliminates any risk of inconsistency between format outputs (which can occur if edits are applied separately per format run).

    ; Output JPEG + PNG + WebP from each source file in a single pass (let* ((filelist (cadr (file-glob "/path/source/*.jpg" 1)))) (for-each (lambda (filename) (let* ((image (car (gimp-file-load RUN-NONINTERACTIVE filename filename))) (basename (car (gimp-image-get-effective-color-profile image))) (name (substring filename (+ 1 (string-rindex filename #\/)) (- (string-length filename) 4)))) ; Apply edits once (gimp-image-scale-full image 1200 (round (* (car (gimp-image-height image)) (/ 1200 (car (gimp-image-width image))))) INTERPOLATION-LINEAR) (plug-in-unsharp-mask RUN-NONINTERACTIVE image (car (gimp-image-get-active-drawable image)) 0.5 0.5 4) (gimp-image-flatten image) (let ((drawable (car (gimp-image-get-active-drawable image)))) ; JPEG (file-jpeg-save RUN-NONINTERACTIVE image drawable (string-append "/path/output/jpg/" name ".jpg") name 0.85 0 0 0 "" 0 1 0 2 0) ; PNG (file-png-save RUN-NONINTERACTIVE image drawable (string-append "/path/output/png/" name ".png") name 0 6 1 1 1 1 1) ; WebP (file-webp-save RUN-NONINTERACTIVE image drawable (string-append "/path/output/webp/" name ".webp") name 0 85 0 0 0 0 0 0 0)) (gimp-image-delete image))) filelist))
⚠️

GIMP 3.2 note: In GIMP 3.x, file-jpeg-save and file-png-save are the correct Script-Fu procedure names for JPEG and PNG export respectively. gimp-file-overwrite can also be used for re-export. The file-webp-save procedure is available if GIMP was compiled with WebP support, which is true of all official GIMP 3.x binaries. If a procedure is missing, the Script-Fu console will return a "no such procedure" error — verify using the Procedure Browser.

Prepare a folder called source/ with 5 JPEG photographs. Create three output folders: output/jpg/, output/png/, and output/webp/. You'll build and run a Script-Fu pipeline that processes every source file and delivers all three formats in one pass.

  • A
    Verify procedures in the Procedure Browser first

    Before writing any script, open Filters → Script-Fu → Procedure Browser and confirm that file-jpeg-save, file-png-save, and file-webp-save all appear. Click each one to view its argument list — note the exact order and types of parameters. Copy the argument list into a text editor as a reference while you write the script. This single step prevents 80% of Script-Fu errors, which are almost always caused by passing arguments in the wrong order or of the wrong type.

  • B
    Test the export chain on one file

    Open the Script-Fu Console. Run the load → scale → flatten → export sequence for a single file, exporting to all three formats. Verify that all three output files appear in their respective folders and open correctly in GIMP. Check file sizes — the WebP file should be noticeably smaller than the JPEG, which should be smaller than the PNG (for a photograph). If any export call fails, read the error message carefully: it will identify which procedure and which argument caused the problem.

  • C
    Wrap in a file-glob loop and run the full batch

    Wrap the single-file test in the file-glob / for-each pattern from Session 16. Replace the hardcoded filename with the filename lambda variable. Use string-append to build the output path for each format, inserting the appropriate subfolder between the output root and the filename. Run the batch and verify the output folders contain correctly processed files for every source image.

  • D
    Compare file sizes and confirm naming conventions

    In your file manager, compare the sizes of the three output versions of the same image. A typical 3000 × 2000 px photograph should yield approximately: PNG 6–9 MB, JPEG at Q85 1.2–2 MB, WebP at Q85 0.8–1.4 MB. If JPEG files are unexpectedly large, the quality setting is too high. If PNG files are smaller than JPEG, the source image has a lot of flat colour and PNG's lossless compression is particularly effective — this is normal. Verify that all output filenames are lowercase with hyphens and that no spaces or special characters appear in any path.

Modern web projects require each image at multiple sizes for responsive <picture> elements: typically 400w, 800w, and 1600w. Extend your batch pipeline to produce all three widths from each source file, naming output files with a width suffix. No step-by-step — design the script structure yourself using what you know.

  • →
    Generate three width variants per source file

    Hint: within the for-each loop for each source file, nest a second for-each over a list of target widths: '(400 800 1600). For each width, duplicate the loaded image with gimp-image-duplicate, scale the duplicate, export it with the width appended to the filename (e.g. hero-800w.webp), then delete the duplicate. Delete the original only after all width variants have been generated. The filename suffix pattern should be name "-" width "w" — e.g. product-shot-800w.jpg.

  • →
    Skip upscaling with a conditional check

    If a source image is narrower than a target width, upscaling it produces a larger but blurrier file — the worst outcome. Add a conditional: only export the width variant if the source image's width is greater than or equal to the target width. In Script-Fu, use (if (>= source-width target-width) ... ). If the condition is false, skip the export for that width variant entirely. This means a 900 px source image generates a 400w and 800w export but skips the 1600w export — correct behaviour.

💡

Hint: Use gimp-image-duplicate rather than re-loading the source file for each width variant. Duplicating an already-loaded image is far faster than reading from disk again, and ensures all width variants are processed from an identical source state — no risk of the second load producing different results from the first.

Your progress is saved locally in your browser.
✓   Session 17 complete. Up next: Session 18 — Web & Screen Export →
🔁
+ 15 minutes

Session 17 Review

15:00 review
Key Concepts
  • File → Save writes only .xcf; File → Export As writes all other formats — these are separate operations by design
  • File → Overwrite re-exports to the same path with the same settings without a dialog — learn its shortcut
  • JPEG Quality 85 is the professional standard for screen delivery; Quality 100 is almost never justified
  • WebP at Quality 85 produces files 25–35% smaller than equivalent JPEG at the same perceived quality
  • TIFF for print should use no compression and be flattened before export for maximum compatibility
  • Use gimp-image-duplicate to generate multiple size variants from one loaded source — faster than reloading
Common Mistakes
  • Using File → Save to try to export a JPEG — it will either error or save an .xcf with a misleading name
  • Setting JPEG Quality to 95–100 for web delivery — unnecessary file size with no perceptible quality gain
  • Exporting a multi-layer file as TIFF without flattening first — some applications cannot open layered TIFFs
  • Naming files with spaces or special characters — breaks URLs, shell scripts, and many automated workflows
  • Forgetting to create output directories before running a batch script — Script-Fu cannot create folders
  • Upscaling source images to hit a target width — produces blurry output; always check source dimensions first
Quick Quiz
  • What is the only file format that File → Save can write in GIMP 3.x?
  • What JPEG quality setting is the professional standard for screen delivery, and why not higher?
  • When should PNG's Lossless mode be chosen over WebP lossy for web images?
  • What Script-Fu function duplicates a loaded image in memory without re-reading from disk?
  • What must you do to a multi-layer image before exporting it as a TIFF for a print vendor?
Next Session Preview
  • Session 18 covers Web & Screen Export in depth — PNG optimisation, WebP, DPI, and the slice workflow
  • You'll learn why DPI is irrelevant for screen output and what the number actually controls
  • Session 18 also covers exporting UI assets and icon sets at multiple densities for HiDPI screens
  • Prerequisite: a simple UI mockup or web banner at 1×, or any image with distinct regions to export as slices
📚 Best Resources
  • 01
    GIMP Official Docs Authoritative reference for every tool, dialog, and preference in GIMP 3.x.
    docs.gimp.org ↗
  • 02
    Davies Media Design Video walkthroughs specifically for GIMP 3.x — best free companion to this course.
    YouTube ↗
  • 03
    GIMP Forums Community support for troubleshooting, plug-in questions, and workflow advice.
    gimp-forum.net ↗