Generator

Background Remover

Browser-only background removal needs an ML model. Reference integrations below for production.

Why not in-browser?

Quality background removal requires a 100MB+ ML model. We recommend a hosted service or running rembg locally.

@imgly/background-removal (npm — runs in browser, downloads model)
import { removeBackground } from "@imgly/background-removal";

const blob = await removeBackground(imageUrl);
const url = URL.createObjectURL(blob);
Python: rembg CLI
pip install rembg
rembg i input.jpg output.png

# Batch:
rembg b -i input_dir -o output_dir
Cloudinary API
const url = `https://res.cloudinary.com/CLOUD/image/upload/e_background_removal/${publicId}`;