Skip to content

imgcompress is a simple and privacy-first image processing tool that runs entirely in Docker. Compress, convert, resize, batch-process images and remove backgrounds using local AI with zero cloud dependencies.

License

Notifications You must be signed in to change notification settings

karimz1/imgcompress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImgCompress: Privacy-First Image Optimizer

Local Image Compression, Format Conversion & AI Background Removal (Docker)

imgcompress_mascot

Docker Pulls Docker Image Size Docker Image Version (latest semver) Release Date License Documentation GitHub Sponsor PayPal Support

ImgCompress is a high-performance, self-hosted Docker image compression and conversion tool featuring fully local AI-powered background removal. Process unlimited images offline with zero cloud uploads, no subscriptions, and complete data sovereignty.

❓ Why choose ImgCompress?

I created ImgCompress as a private alternative to cloud-based converters. Most web tools force a choice between convenience and privacy. ImgCompress is a complete local-first image web tool that handles everything from batch resizing to professional AI background removal on your own hardware.

🛡️ Privacy by Design (Compliance-Friendly)

Unlike traditional SaaS services, ImgCompress is built around a strict “Privacy by Default” philosophy. All image processing happens entirely on your own hardware, making it suitable for handling sensitive or regulated data without relying on external services.

  • 100% Local Processing: All operations run exclusively on your CPU/GPU.
  • No External API Calls: Images are never uploaded, proxied, or shared with third-party servers.
  • Air-Gapped Ready: Fully functional in offline and restricted network environments.

Table of Content


Quick Start

Get up and running in seconds with Docker. Imgcompress Docker Image.

Docker Run

docker run --name imgcompress -p 3001:5000 karimz1/imgcompress:latest

Docker Compose

services:
  imgcompress:
    image: karimz1/imgcompress:latest
    container_name: imgcompress
    restart: always
    ports:
      - "3001:5000"

Open your browser and visit http://localhost:3001.

For advanced use cases, detailed configuration, and deployment options, please visit:
Full Installation Guide & Documentation


Advanced Image Processing Features

  • HEIC/HEIF to JPG Converter: Instantly convert iPhone photos into high-quality JPEG or PNG.
  • Local AI Background Removal: Powered by U²-Net in combination with the Python package rembg for 100% offline background removal.
  • PDF to Image Tool: Extract PDF pages as individual high-resolution images (PNG/JPG/AVIF).
  • Universal Format Support: Convert between 70+ formats including WebP, PSD, EPS, and TIFF.
  • Professional Compression Controls: Fine-tune quality settings, dimensions, and lossless optimization.
  • Automation Friendly: Scriptable CLI with JSON output for DevOps and CI/CD pipelines.
  • Cross-Platform: Runs everywhere (Linux, Mac, Windows, Raspberry Pi) via Docker.

Local AI Background Removal Result:

Original Image Background Removed (Local AI)
Original image before background removal Image after AI background removal

ℹ️ Info

Processed fully locally using rembg and
U2-Net local AI model.
No data ever leaves your network.

Internally it also uses onnxruntime.
ImgCompress also uses Pillow for image re-serialization.

📸 Source of Original Image Landscape with sunset in Yixing (Freepik), used for demonstration purposes.


Web UI Preview

For a detailed guide on using the Web Interface in imgcompress, please visit the How to Use the Web UI.

Step Screenshot Description
1 Upload and configure image compression settings Upload & Configure
Drag & drop images or PDFs, choose format, configure options.
2 Processing images locally Processing
Images are processed locally with live progress feedback.
3 Download optimized images Download Results
Download files individually or as a ZIP archive.

Business & Personal Use Cases

  • Web Developers: Optimize website assets to improve Google PageSpeed scores.
  • Photographers: Batch compress high-res galleries by up to 80% without visible quality loss using AVIF Format.
  • Privacy-Conscious Users: Securely process family photos and sensitive documents without uploading them to cloud servers.
  • Enterprises: Maintain GDPR, HIPAA, or SOC2 compliance by processing all media in-house, ensuring no data share.

Frequently Asked Questions (FAQ)

Is imgcompress really free?

Yes, it is 100% free and open-source. There are no subscriptions, no paid tiers, and no limits on the number of images you can process. It works on your own hardware so convert as many images as you like.

Do I need an internet connection?

No. Once you've pulled the Docker image, imgcompress works entirely offline. No data is ever sent to the cloud, making it perfect for privacy-sensitive work.

How does this compare to TinyPNG or Squoosh?

ImgCompress is an easy-to-use all-in-one toolkit. Unlike online tools that limit you to basic formats, ImgCompress supports nearly all image formats: including HEIC, HEIF, PSD (Photoshop), EPS (Vector), AVIF, and many more. It brings professional-grade format support and bulk optimization directly to your local hardware all for average users in a simple and nice Web Interface.


Hall of Fame

GitHub Sponsor PayPal Support

I love thanking my supporters! Whether you use GitHub or PayPal, your contribution is recognized here.

✨ Special Thanks A very special thank you for the incredible support and encouragement for this project!

Date Supporter Project Impact
Jan 2026 Anonymous One-time Donation (PayPal)
Oct 2025 @Fayyaadh One-time Donation (PayPal)

Note for PayPal Supporters: To be added to the table above, please include a note in the PayPal payment field with your GitHub profile link or website.

Prefer to stay under the radar? You are always welcome to support anonymously.

Thank you for being part of the journey!


Release Notes & License

About

imgcompress is a simple and privacy-first image processing tool that runs entirely in Docker. Compress, convert, resize, batch-process images and remove backgrounds using local AI with zero cloud dependencies.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages