WebP encoding, without shipping a native binary or a WebAssembly module.
I ported my PHP WebP encoder to TypeScript and published PicoWebPJS.
It includes its own PNG, baseline JPEG and BMP readers and writes the WebP bitstream itself. The same encoding core runs in Node.js and modern browsers, with zero runtime dependencies.
That gives an upload tool the option to convert images on the user's device, and a Node application an encoder without platform-specific native bindings. Transparency and colour profiles are preserved, with a browser-worker example and resumable Node.js encoding included.
Native encoders are generally faster. This package is for the cases where keeping image processing portable and free of native tooling is worth that trade-off.
WebP encoding. Pure TypeScript. No WASM.
WebP encoding, without shipping a native binary or a WebAssembly module.
I ported my PHP WebP encoder (https://contr...