Client-side background removal that keeps your pixels at home
A TypeScript library that runs ONNX image segmentation models in the browser and Node.js so images never leave the machine.

What it does
@imgly/background-removal strips backgrounds from images using ONNX models, entirely in the browser or Node.js. No API calls, no metered billing, no sending user photos to a server you don’t control. There’s a separate @imgly/background-removal-node package for server-side use.
The interesting bit
The privacy angle is the real sell here — the README hammers “no additional costs or privacy concerns” because the computation happens locally. For e-commerce or healthcare apps where user images are radioactive, that’s genuinely useful. The trade-off is you ship the model weight to the client.
Key highlights
- Browser and Node.js packages are split (
@imgly/background-removalvs@imgly/background-removal-node) - Built on ONNX for cross-platform model inference
- AGPL licensed; commercial licenses require contacting IMG.LY directly
- Maintained by IMG.LY, makers of CreativeEditor SDK and PhotoEditor SDK
- Interactive demo available at img.ly/showcases
Caveats
- The README is thin on technical specifics — no model size, no benchmark numbers, no browser compatibility matrix
- “Powerful” and “seamlessly” appear in the README, but actual performance claims are absent
- AGPL copyleft may be a non-starter for commercial products unless you negotiate a paid license
Verdict
Worth a look if you’re building image editors or product photography tools where privacy compliance matters more than shaving every kilobyte. Skip it if you need proven performance metrics or a permissive license out of the box.