Skip to main content
Browse documentation

Configuration

Configure ImageForge CLI

Keep options reviewable and identical across developers and automation.

Create a starter file

The init command refuses to overwrite an existing config unless you pass --force.

imageforge init

Example config

{
  "output": "imageforge.json",
  "formats": ["webp", "avif"],
  "quality": 80,
  "blur": true,
  "widths": [320, 640, 960, 1280],
  "outDir": "public/generated",
  "concurrency": 4
}

Resolution order

Internal defaults are applied first, then an explicit --config file, imageforge.config.json, or package.json#imageforge. CLI flags win last. Unknown keys fail fast instead of being ignored.