explaingit

imgly/background-removal-js

7,136TypeScriptAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

A JavaScript library that removes image backgrounds entirely in the browser or Node.js using a local machine learning model, no server upload, no per-use fees, and no image data leaves the user's device.

Mindmap

mindmap
  root((repo))
    What it does
      Remove backgrounds
      Runs locally
      No server upload
    Packages
      Browser package
      Node.js package
    Tech Stack
      TypeScript
      JavaScript
      npm
    Use Cases
      E-commerce photos
      Photo editing tools
      Privacy-first apps
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Remove product photo backgrounds in an e-commerce site directly in the user's browser

USE CASE 2

Add real-time background removal to a web-based photo editing tool

USE CASE 3

Process images on the server with Node.js without sending them to an external service

USE CASE 4

Build a privacy-first image tool where no user photos ever leave their device

Tech stack

TypeScriptJavaScriptNode.jsnpm

Getting it running

Difficulty · easy Time to first run · 30min

AGPL license means closed-source commercial apps must purchase a commercial license from IMG.LY before shipping.

Free to use if your project is also open-source under AGPL, commercial use in a closed-source product requires a separate paid license from IMG.LY.

In plain English

This repository contains a JavaScript library for removing the background from images, and it does so entirely inside the browser or inside a Node.js server environment. Nothing is sent to an external server. The image processing happens locally using a machine learning model that runs directly in the browser, which means there are no per-use fees and no image data leaves the user's device. There are two packages: one for browser use and one for Node.js. Both are available through npm, the standard JavaScript package manager, so developers can add them to their projects with a single install command. The browser version is aimed at apps and websites that need to process images on the client side, such as e-commerce sites that want to remove product image backgrounds in real time, photo editing tools, or web design applications. The README describes the intended audience as developers building products that need this capability built in. Background removal is a common need in e-commerce, where product photos are often cleaned up by removing their backgrounds before display. The library is released under the AGPL license, which is a free open-source license that requires derivative works to be open-source as well. Commercial licensing is available separately from the company, IMG.LY, which makes creative editing SDKs for photo and video applications. The README itself is short and does not include code examples or detailed setup instructions.

Copy-paste prompts

Prompt 1
Using the imgly background-removal-js browser package, show me how to remove the background from an image the user uploads via a file input and display the result on the page.
Prompt 2
I am building a Node.js script to batch-process product images and remove their backgrounds. Show me how to use the @imgly/background-removal-node package to process a folder of JPEGs.
Prompt 3
How do I add the imgly background-removal-js library to a React app and call it when the user clicks a Remove Background button?
Prompt 4
What does the AGPL license in background-removal-js mean for my startup's closed-source web app? Do I need to pay for a commercial license?
Prompt 5
I want to show a loading spinner while background-removal-js processes the image. How do I hook into the progress or promise to update my UI?
Open on GitHub → Explain another repo

← imgly on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.