OptionalformatTarget output format. Default: 'auto' (converts PNG/JPEG to WebP).
OptionalqualityEncoder quality from 0.0 (worst) to 1.0 (best). Default: 0.8.
OptionalmaxResize output width to at most this many pixels (maintains aspect ratio).
OptionalmaxResize output height to at most this many pixels (maintains aspect ratio).
OptionalpreserveWhen true, EXIF/metadata is preserved in the output. Default: false (stripped).
OptionalstrictIf the compressed image is larger than the original, return the original. Default: false.
OptionaluseExplicitly force Web Worker usage (true) or Main Thread usage (false). If omitted, the library chooses based on file size and operation type.
OptionalonCalled with progress 0–100 during heavy-path (FFmpeg) operations.
OptionalsignalCancel the operation. Throws AbortError when signalled.
Options for compressImage().