New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@quick-start-soft/quick-remove-image-background

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@quick-start-soft/quick-remove-image-background

A powerful CLI tool to remove backgrounds from images using AI technology.

latest
npmnpm
Version
1.4.2511142125
Version published
Weekly downloads
8
-74.19%
Maintainers
1
Weekly downloads
 
Created
Source

Quick Remove Image Background

A powerful CLI tool to remove backgrounds from images using AI technology.

Features

  • Remove backgrounds from single images or batch process multiple images
  • Support for common image formats (PNG, JPG, JPEG, WEBP)
  • Flexible output options (specify output path, directory, or overwrite)
  • Progress indication for batch operations
  • Verbose logging mode for debugging
  • Works with both local and global npm installations
  • Automatic resource resolution for IMG.LY models

Installation

Global Installation

npm install -g @quick-start-soft/quick-remove-image-background

Important: After global installation, you may need to run the setup command to configure resources:

quick-remove-image-background setup

This will copy the necessary IMG.LY resources to your home directory and provide instructions on how to configure the tool.

Local Development

npm install
npm run build
npm link

Usage

Basic Usage

Remove background from a single image:

quick-remove-image-background remove image.jpg

This will create image.png in the __background_removed__ subdirectory in the current working directory.

Specify Output File

quick-remove-image-background remove input.jpg -o output.png

Batch Processing

Process all images in a directory:

quick-remove-image-background remove /path/to/images/

This will create a __background_removed__ subdirectory inside /path/to/images/ with all processed images.

Process images matching a pattern:

quick-remove-image-background remove "photos/*.jpg"

This will create a __background_removed__ subdirectory in the current working directory.

Overwrite Original Files

quick-remove-image-background remove image.jpg --overwrite

Specify Custom Output Directory

quick-remove-image-background remove image.jpg -d ./custom-output/

Options

  • -o, --output <path>: Output file path (single file mode)
  • -d, --output-dir <path>: Output directory (default: __background_removed__ in current or input directory)
  • --overwrite: Overwrite original files
  • -v, --verbose: Enable verbose logging
  • --public-path <path>: Custom public path for IMG.LY resources

Note: All output images are saved as PNG files with transparent backgrounds.

Examples

Single Image with Custom Output

quick-remove-image-background remove portrait.jpg -o portrait-transparent.png

Batch Process with Specific Directory

quick-remove-image-background remove "./images/*.jpg" -d "./no-bg/"

Verbose Mode for Debugging

quick-remove-image-background remove image.jpg -v

How It Works

This tool uses the @imgly/background-removal-node package, which leverages AI models to intelligently detect and remove backgrounds from images. The AI model runs locally on your machine, ensuring privacy and eliminating the need for external API calls.

Performance

  • Processing time depends on image size and complexity
  • Batch processing runs with concurrency for optimal performance
  • Large images may require more memory

Supported Formats

  • Input: PNG, JPG, JPEG, WEBP
  • Output: PNG, JPG, WEBP

License

ISC

Troubleshooting

"Resource metadata not found" Error

If you encounter this error when running the tool globally, it means the IMG.LY resources cannot be found. The tool will automatically fall back to using the IMG.LY CDN (requires internet connection).

To use the tool offline or improve performance, you can:

  • Run the setup command (Recommended for offline use):

    quick-remove-image-background setup
    
  • Set the environment variable:

    export IMGLY_PUBLIC_PATH="https://unpkg.com/@imgly/background-removal-node@1.4.5/dist/"
    # Or for local resources after setup:
    export IMGLY_PUBLIC_PATH="file://$HOME/.quick-remove-image-background/resources/"
    
  • Use the --public-path option:

    quick-remove-image-background --public-path "file:///path/to/resources/" remove image.jpg
    

The tool will automatically try to locate resources in the following order:

  • Command-line --public-path option
  • IMGLY_PUBLIC_PATH environment variable
  • Automatic resolution based on package location
  • IMG.LY's CDN (fallback)

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

FAQs

Package last updated on 14 Nov 2025

Related posts