'policies' => [
'encode' => [ /* … */ ],
'geometry' => [ /* … */ ],
'safety' => [ /* … */ ],
'cleanup' => [ /* … */ ],
'fallback' => [ /* … */ ],
],| Key | Default | Effect |
|---|---|---|
| stripMetadata | true | Remove EXIF/IPTC when the driver supports it |
| progressive | false | Progressive/interlaced output where supported |
| pngCompression | 6 | PNG compression level (0–9) |
| Key | Default | Effect |
|---|---|---|
| allowUpscale | false | Resize/fit will not enlarge beyond the source |
| sharpness | sharp | Downscale sharpness: soft | normal | sharp | extra |
Changing sharpness regenerates derivatives (it is part of the identity). Prefer Imagick or libvips over GD for the sharpest downscales.
| Key | Default | Effect |
|---|---|---|
| maxSourcePixels | 40_000_000 | Soft cap on source width × height after load |
Automatic derivative removal when EE files are deleted or replaced.
| Key | Default | Effect |
|---|---|---|
| onFileDelete | true | Purge indexed derivatives when a File is deleted |
| onFileReplace | true | Purge indexed derivatives when a File is replaced |
Indexed entries record identity, storage path, and adapter. Preview artifacts under preview/ use cleanup.previewRetentionDays instead.
Bulk CLI cleanup (--orphaned / --all) is also gated by cleanup.generatedRetentionDays.
Optional delivery fallback when planning fails (missing file, invalid source).
| Key | Default | Effect |
|---|---|---|
| enabled | false | Retry planning once with the fallback File |
| fileId | null | File ID to use as fallback |
'policies' => [
'fallback' => [
'enabled' => true,
'fileId' => 42,
],
],Fallback is attempted at most once per call. Strict PHP generate() still throws.