Optional ReadonlythreadsOpt into multithreaded decode (wasm-bindgen-rayon over Web Workers +
SharedArrayBuffer). Used only on a cross-origin-isolated page
(crossOriginIsolated === true); otherwise the single-thread build is
used. Ignored when wasmBytes is supplied (the worker pool resolves its
worker + wasm by URL, not from raw bytes). Default: single-thread.
number — that many worker threads'auto' — navigator.hardwareConcurrency (fallback 4)false — single-thread (default)Optional ReadonlywasmRaw decoder .wasm bytes to instantiate directly (single-thread +simd128
build) — for Node/Bun or any environment without a fetchable URL. Highest
precedence; when set the multithread and best-perf builds are skipped and
threads is ignored (the worker pool resolves its worker + wasm by
URL, not from raw bytes).
Optional ReadonlywasmExplicit URL to fetch the decoder .wasm from (single-thread +simd128
build). Overrides configure({ wasmBaseUrl }). Works in the browser and
Node/Bun.
wasm host initialization for the JPEG XL decoder — where to load/serve the decoder
.wasmfrom, and whether to use the multithreaded build. Used as JxlDecoderOptions.wasmInit.Remarks
The wasm asset precedence (an explicit
wasmBytes/wasmUrlhere →configure({ wasmBaseUrl })→ the build default) is documented once on core'sBitruviusConfig.