WebP encoding. Pure TypeScript. No WASM. WebP encoding, without shipping a native binary or a Web...WebP encoding. Pure TypeScript. No WASM. WebP encoding, without shipping a native binary or a Web...
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
WebP encoding. Pure TypeScript. No WASM.
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.
Open source. MIT licensed. Available on npm.
npm install picowebpjs
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started