Experience the power of imgcompress with the NEW modern Web UI. Check out the quick demo below:
Ever been frustrated by juggling multiple programs just to convert or compress images? I did too.
I'm Karim Zouine and I built imgcompress as a one-stop solution to effortlessly compress, convert, and resize your images—all inside a Docker container. No more complicated installations or worrying about privacy with online converters. Everything runs locally, secure and consistent across any system.
Stay up-to-date with the newest improvements:
-
22.02.25: Feature: See all Supported Import Formats in the UI
-
NEW: The Web UI now includes Storage Management for Cleanups Quickly manage and clean up your storage directly from the Web UI.
-
NEW: PNG Processing now supports Transparency Enjoy enhanced image processing that now preserves PNG transparency.
For more details, check out the linked GitHub issues and pull requests!
-
📱 Convert iPhone HEIC Photos:
Easily convert your iPhone's HEIC images to JPEG or PNG for smaller file sizes and universal compatibility. -
🖼️ Universal Format Conversion & Resizing:
Transform almost any photo format to JPEG or PNG or ICO and resize images effortlessly—ideal for creating thumbnails, web-optimized images like, or custom sizes. -
⚙️ Customizable Output Quality:
Fine-tune the compression settings to balance image clarity and file size, ensuring your photos look great while saving space. -
🗂️ Batch & Single File Processing:
Whether you're processing one photo or an entire folder, imgcompress handles it all with ease. -
🔄 Seamless Automation & Flexible Logging:
Integrate imgcompress into your CI/CD pipelines and choose between human-readable logs or structured JSON for a smoother workflow.
If you find imgcompress valuable, please consider supporting the project (entirely optional). Your contributions help fund the infrastructure and development tools needed to build even better open source software during my free time. Thank you for your support!
Pull the latest image:
docker pull karimz1/imgcompress:latest
-
Launch the Web UI:
docker run --rm -p 8081:5000 karimz1/imgcompress:latest web
Note: The container's internal port
5000
is mapped to the host's port8081
in my example. You can choose a different host port by modifying the-p
flag (e.g.,-p 9090:5000
). -
Access the Web UI:
Open your browser and go to: http://localhost:8081
-
Explore the Features:
- Drag & Drop Uploads: Simply drag your images into the browser.
- Batch Processing: Compress multiple images simultaneously.
- Real-Time Progress: Watch your images optimize live.
- Download Instantly: Retrieve your optimized images directly from the browser.
- Customizable Settings: Tweak quality and resize options effortlessly.
Single File Processing:
docker run --rm \
-v "$(pwd):/container/images" \
-v "$(pwd)/converted:/container/converted" \
karimz1/imgcompress:latest \
/container/images/example.jpg /container/converted --quality 80 --width 1920
Folder Processing:
docker run --rm \
-v "$(pwd):/container/images" \
-v "$(pwd)/converted:/container/converted" \
karimz1/imgcompress:latest \
/container/images /container/converted --quality 85 --width 800
-
📁 Local Directory Mapping:
Map your host machine’s directories into the Docker container:
- Input: Your original images.
- Output: Your optimized images.
-
⚙️ Process Parameters:
Customize your conversion with:
--quality
: Set JPEG quality (1–100, default: 85).--width
: Resize images to a desired width (optional).--debug
: Enable detailed logging.--json-output
: Generate logs in JSON format for automation workflows.
Text Output:
Starting image conversion process.
Processing directory: /container/input_folder/
Converted: /container/input_folder/photo1.jpg -> /container/output_folder/photo1.jpg (Q=80, W=800)
Converted: /container/input_folder/photo2.png -> /container/output_folder/photo2.jpg (Q=80, W=800)
Summary: 2 files processed, 0 errors.
JSON Output:
{
"status": "complete",
"conversion_results": {
"files": [
{
"file": "photo1.jpg",
"source": "/container/input_folder/photo1.jpg",
"destination": "/container/output_folder/photo1.jpg",
"original_width": 3648,
"resized_width": 800,
"is_successful": true,
"error": null
},
{
"file": "photo2.png",
"source": "/container/input_folder/photo2.png",
"destination": "/container/output_folder/photo2.jpg",
"original_width": 6000,
"resized_width": 800,
"is_successful": true,
"error": null
}
],
"file_processing_summary": {
"total_files_count": 2,
"successful_files_count": 2,
"failed_files_count": 0
}
}
}
- 🔧 CI/CD Integration:
Use the
--json-output
flag to obtain structured results for automation, it acts as a mini API.
Display all available options:
docker run --rm karimz1/imgcompress --help
I use the Pillow and Pillow-HEIC libraries in Python to support the following image formats in my app. Whenever Pillow adds support for more formats, the app will reflect those changes, when I do an update release.
Below is a list of all the image formats that are supported at the moment:
- .apng
- .blp
- .bmp
- .bufr
- .bw
- .cur
- .dcx
- .dds
- .dib
- .emf
- .eps
- .fit
- .fits
- .flc
- .fli
- .ftc
- .ftu
- .gbr
- .gif
- .grib
- .h5
- .hdf
- .heic
- .heif
- .icb
- .icns
- .ico
- .iim
- .im
- .j2c
- .j2k
- .jfif
- .jp2
- .jpc
- .jpe
- .jpeg
- .jpf
- .jpg
- .jpx
- .mpeg
- .mpg
- .msp
- .pbm
- .pcd
- .pcx
- .pfm
- .pgm
- .png
- .pnm
- .ppm
- .ps
- .psd
- .pxr
- .qoi
- .ras
- .rgb
- .rgba
- .sgi
- .tga
- .tif
- .tiff
- .vda
- .vst
- .webp
- .wmf
- .xbm
- .xpm
This Docker image is built and tested via my CI/CD pipeline for the following platforms:
-
✅ linux/amd64 Intel/AMD x86_64 – Suitable for most Linux distributions and Windows via WSL2
-
✅ linux/arm64 Apple Silicon (Mac & other ARM64 devices)
-
✅ Windows Runs via WSL2 with Linux containers enabled – no native Windows container support required.
-
❌ linux/arm/v7 Not supported due to dependency limitations.
-
❌ linux/ppc64le and linux/s390x Not supported due to dependency limitations.
All of the supported platforms above are tested exclusively in my CI/CD pipeline using emulation (e.g., QEMU) and matrix builds. This means that while the builds have been verified in a virtualized environment, they have not been all manually tested on physical hardware for all target architectures.
Your images remain private—no uploads to third-party servers. Everything runs locally in Docker, ensuring your data stays secure and under your control.
Interested in contributing? Visit the Source Code on GitHub and feel free to fork, branch, and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.