Skip to content

Image Optimizer for Web: Efficient Image Compression for the Web

The Image-Optimizer-for-Web is a comprehensive web-based tool designed to convert and optimize images for web use through the WebP format. This tool significantly reduces image file sizes while maintaining visual quality, making it perfect for optimizing website performance and reducing bandwidth usage.

GitHub Repository: Image-Optimizer-for-Web

Key Features

Modern Web Interface - Intuitive drag-and-drop upload functionality - Real-time file size comparison between original and converted images - Batch processing capability for multiple images - No installation required - runs in your web browser

Conversion Capabilities - Supports multiple input formats (PNG, JPG, JPEG, TIFF, BMP, GIF, WEBP) - Preserves PNG transparency - Offers three optimization levels for different use cases - Resizes images while maintaining aspect ratio

Quality Presets

Mode Quality Best For
1 80% General web usage (balanced)
2 90% Photography/Art (high quality)
3 60% Maximum savings (smallest file size)

Installation Options

The easiest way to use Image-Optimizer-for-Web is through Docker:

# Pull the image from GitHub Container Registry
docker pull ghcr.io/binuengoor/image-optimizer-for-web:latest

# Run the container
docker run -d -p 3756:3756 \
  -v $(pwd)/input:/app/input \
  -v $(pwd)/output:/app/output \
  --name webp-optimizer \
  ghcr.io/binuengoor/image-optimizer-for-web:latest

Or using Docker Compose:

# Clone the repository
git clone https://github.com/binuengoor/Image-Optimizer-for-Web

# Start with Docker Compose
cd Image-Optimizer-for-Web
docker-compose up -d

Local Development

If you prefer to run the application directly:

# Clone the repository
git clone https://github.com/binuengoor/Image-Optimizer-for-Web

# Install dependencies
pip install -r requirements.txt

# Run the application
python3 script.py

Using the Web Interface

  1. Open your browser and navigate to http://localhost:3756
  2. Drag and drop images into the upload area or click "Browse Files" to select images
  3. Once uploaded, select your desired compression mode and maximum dimension
  4. Click "Convert" to process the images
  5. Download the converted WebP files individually or clear folders as needed

Technical Details

  • The application automatically converts uploaded images to WebP format
  • File sizes are displayed for both input and output files
  • The output folder can be accessed directly through the web interface
  • Image dimensions can be limited while preserving aspect ratio
  • The web interface shows a live preview of conversion results

Tips for Best Results

  • For general website usage, use Mode 1 (80%) for a good balance between quality and size
  • Use Mode 2 (90%) for photography portfolios where quality is crucial
  • Mode 3 (60%) works well for thumbnails, previews, and background images
  • The Max Dimension setting helps optimize large images without manually resizing them first
  • For batch processing many images, use the web interface's drag-and-drop functionality

Docker Environment Variables

When running the Docker container, you can customize behavior with these variables:

# Enable debug mode
-e DEBUG=True

# Set maximum upload file size (default: 16MB)
-e MAX_UPLOAD_SIZE=33554432

The Image-Optimizer-for-Web provides a modern, convenient approach to WebP conversion, whether you're a developer optimizing images for a website or a content creator looking to reduce file sizes while maintaining quality.