Thursday, September 07, 2023

WASM: Sharp.js native lib in web browser

 Bringing Sharp to WebAssembly and WebContainers

WebContainers is an environment that allows you to run Node.js directly in your browser. It can easily handle any JavaScript, including npm modules. However, when it comes to image processing and optimisation, users of toolchains such as Gatsby, Astro, Next.js and others were facing difficulties. The most popular libraries used for this task are @squoosh/lib derived from Squoosh.app - sadly, no longer maintained as a library - and Sharp, which uses a native Node.js addon for the expensive processing under the hood. => porting Sharp to WebAssembly,

No comments: