Skip to content
1 min read · 156 words

@nhtio/adk/batteries/media/engines/sharp

A Node-native image @nhtio/adk/batteries/media/contracts!MediaEngine backed by sharp (libvips bindings — fast, full-format).

Remarks

The performance/fidelity engine for Node deployments: native speed plus webp/avif output and the full fit mode set, plus a generation edge — EMPTY_MIME → a blank 1024×1024 white canvas in any supported encoding (resize in the same statement). sharp is permanently Node-only (native bindings); for a cross-environment engine compose the jimp implementation instead — the capability declaration is the seam, and BYO instances adapt via fromSharp.

sharp is an optional peer dependency, lazily imported on first actual use.

Interfaces

InterfaceDescription
SharpEngineOptionsOptions for sharpEngine.

Functions

FunctionDescription
fromSharpAdapt an already-configured sharp module (your import, your build flags) to the engine contract — the BYO transformer.
sharpEngineConstruct the sharp-backed image engine.