Skip to content
TiritibambixPublic

About

ImaGUIck is a free and open-source software, using ImageMagick®, used for editing and manipulating digital images. It can be used to edit or convert images, and supports a wide range of file formats, including JPEG, PNG, GIF, TIFF, PDF and RAW files.

Topics

Resources

Stars

30 stars

Watchers

1 watching

Forks

Repository files navigation

ImaGUIck

Platform Support Build and Push Docker Image No build step

A self-hosted web interface for image resizing, format conversion, and animated GIF/WEBP creation, powered by ImageMagick, with no accounts, no database, and no tracking.


⚠️ Security notice

This application has been coded with the help of AI and is designed for local or trusted-network use only. It has no built-in authentication. Exposing it to the public internet without an additional access-control layer (reverse proxy with auth, VPN, etc.) is done at your own risk.


Features

Upload

  • Drag-and-drop: single file, multi-select, or whole folders
  • URL import: fetch an image directly from a URL (with SSRF protection)
  • Tab switcher: Resize and Create GIF/WEBP live on the same page

Resize & convert

  • Single and batch processing: one image or hundreds, each tracked individually
  • Flexible resizing: exact dimensions (with optional aspect-ratio lock), percentage, one-click presets (1080p / 1920p), or 2x / 3x / 4x Lanczos enlarge with a light sharpen
  • Wide format support
    • Common: JPG, PNG, GIF, BMP, TIFF, WEBP
    • RAW: ARW, CR2, CR3, NEF, RAF, RW2, DNG (via ExifTool + dcraw)
    • Modern: JXL (via libjxl)
    • Animation: GIF, WEBP, APNG
    • Vector / document in: SVG (rasterized by librsvg), PDF and EPS (rasterized by Ghostscript, first page only)
    • Vector out: SVG, EPS, PDF, AI (requires potrace)
  • DPI control for vector/PDF sources: rasterize at 72, 150, 300 or 600 dpi, with the resulting pixel size shown before you choose
  • Cropping: centred aspect ratio (1:1, 4:3, 3:2, 16:9) or explicit pixel region with offsets
  • Transform: rotate 90 / 180 / 270 degrees, mirror horizontally or vertically
  • Repair: noise reduction — despeckle, smooth, or edge-preserving (Kuwahara) with three intensity levels
  • Tone: auto-level (stretches levels to full range) and auto-gamma (corrects exposure globally)
  • Look: effects (grayscale, sepia, negative), three-level blur, and three-level unsharp masking
  • Text watermark: caption with a drop shadow, a nine-position placement grid, adjustable size, opacity, and font choice (Sans, Sans Bold, Serif)
  • Output control: format conversion across the full format list, quality slider (1–100), metadata stripping, and background-colour picker (white / black / gray / hex) for flattening transparent images into opaque formats
  • Smart format recommendations: context-aware suggestions based on whether the image is photographic or graphic, and whether it has transparency
  • Real-time progress: per-file status streamed via Server-Sent Events (SSE) during batch jobs, with individual error reporting per file
  • Automatic ZIP export: processed batch files packaged and ready to download

Animated GIF / WEBP

  • Create an animation from a sequence of images:
    • Drag to reorder frames
    • Live animation preview (canvas-based playback at real frame rate) before processing
    • Set FPS (1–30), loop count (0 = forever), and an optional shared canvas size
    • Palette size (2–256 colours for GIF) or quality (for WEBP)
    • Output as GIF or WEBP
  • Edit an existing animated GIF or WEBP:
    • Resize (by dimensions or percentage)
    • Optimize (palette size, Floyd-Steinberg dithering toggle)
    • Change playback speed (0.1x to 10x)
    • Reverse
    • Rotate / flip
    • Change loop count
    • Extract a single frame, a frame range, or every frame (as PNG or WEBP, zipped when more than one)
  • Reachable from the GIF tab (upload one animated file) or from the resize options page of an animated file via the "Edit as animation" link
  • Animated WEBP output is automatically offered or hidden depending on whether the server's ImageMagick build supports WEBP muxing — no dead options in the UI

Housekeeping

  • Automatic cleanup: uploaded and output files purged after 48 hours; completed batch/GIF jobs purged from memory after 2 hours
  • Health check: /health endpoint for Docker healthchecks and monitoring

Screenshots

Upload: drag-and-drop or URL import, with a Resize / Create GIF·WEBP tab switcher

Upload

Resize options: options grouped in the order the pipeline applies them, each group stating its own setting while collapsed and the run bar summarising the whole chain

Resize options

Create GIF/WEBP: live animation preview before processing, with FPS, loop and canvas controls below

Create GIF/WEBP

Batch progress: real-time per-file status streamed over SSE, a failed file reporting its own reason without stopping the rest

Batch progress


Upload limits

Limit Value
Total request size 2 GB
Per-file maximum 200 MB
Maximum image dimension 10 000 px per side
Maximum GIF/WEBP canvas dimension 4 000 px per side
Maximum frames per animation 500
Concurrent ImageMagick workers 4 (semaphore-controlled)

Batch uploads and GIF/WEBP creation are both processed asynchronously: the browser redirects to a live progress page immediately after the transfer completes, and each item shows its own status (queued / processing / done / error) via SSE. A ZIP archive is created automatically for batch resizes and multi-frame extractions.


Installation

Prerequisites

Dependency Version Notes
Python 3.11+ Pillow 13, which carries the current decoder security fixes, requires it
ImageMagick 7.1.2-31+ ImageMagick 7 only: the app calls magick, which ImageMagick 6 does not provide
ExifTool any Required for RAW metadata
potrace any Required for vector output (SVG, EPS, PDF)
libwebp (+ pkg-config) any Required for animated WEBP creation/editing; single-frame WEBP works without it
librsvg any Required for SVG input. Without it ImageMagick uses its own minimal renderer, which ignores gradients, filters, clip paths, CSS and text
Docker any Recommended deployment method

Docker (recommended)

Option 1: Docker Compose

Create a docker-compose.yml:

services:
  imaguick:
    stdin_open: true
    tty: true
    volumes:
      - ./uploads:/app/uploads
      - ./output:/app/output
    ports:
      - 5000:5000
    image: tiritibambix/imaguick:latest
    environment:
      - FLASK_SECRET_KEY=${FLASK_SECRET_KEY:-change-me-in-production}
    healthcheck:
      test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:5000/health', timeout=5)"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s
networks: {}

Then run:

docker compose up -d

Option 2: docker run

docker run -it --rm \
    -v $(pwd)/uploads:/app/uploads \
    -v $(pwd)/output:/app/output \
    -e FLASK_SECRET_KEY=change-me-in-production \
    -p 5000:5000 \
    tiritibambix/imaguick:latest

Option 3: build from source

git clone https://github.com/tiritibambix/ImaGUIck.git
cd ImaGUIck
docker build -t imaguick .
docker run -it --rm \
    -v $(pwd)/uploads:/app/uploads \
    -v $(pwd)/output:/app/output \
    -p 5000:5000 \
    imaguick

Local installation

git clone https://github.com/tiritibambix/ImaGUIck.git
cd ImaGUIck
mkdir -p uploads output
pip install -r requirements.txt

Verify dependencies:

magick -version    # ImageMagick 7.1.2-31 or newer
exiftool -ver
potrace --version  # required for SVG/EPS/PDF output
magick -list format | grep -i WEBP   # a + in the WEBP row's mode means animation is supported

Start the server:

python app.py

The application is available at http://localhost:5000.

Note: The local installation runs a cleanup task that removes files older than 48 hours. Trigger it manually with python cleanup.py --now.


Usage

Resize or convert an image

  1. Open http://localhost:5000 in your browser.
  2. Select your import method:
    • Upload: drag-and-drop or file picker (single file or batch, folders accepted)
    • URL: paste a direct image URL
  3. Configure processing options: resize mode (dimensions, percentage, or preset), enhancement options (auto-level, auto-gamma, noise reduction, sharpening level), and output format.
  4. Submit: for batches, a live progress page tracks each file in real time.
  5. Download the result or ZIP archive when processing completes.

Create an animated GIF/WEBP

  1. On the upload page, switch to the Create GIF · WEBP tab.
  2. Select two or more images: drag the rows to set the frame order.
  3. Upload, then set FPS, loop count, an optional shared canvas size, palette size / quality, and output format (GIF or WEBP).
  4. Submit: a live progress page tracks the build, then offers the animation for download.

Edit an existing animation

  1. On the upload page, switch to the Create GIF · WEBP tab.
  2. Select a single animated GIF or WEBP: one animated file means editing, several images mean building a new animation.
  3. Pick an operation (resize, optimize, speed, reverse, rotate/flip, loop count, or frame extraction) and apply it.

You can also get there from the resize options page of an animated file, via the Edit as animation link shown once the animation is detected.


File cleanup

Method Command
Automatic (every 12 h, files > 48 h) Runs via cron inside the container
Manual: files older than 48 h docker exec <container> /app/cleanup.sh
Manual: all files immediately docker exec <container> /app/cleanup.sh --all

Technical architecture

Stack

Layer Technology
Backend Flask (Python 3.11+), Gunicorn (gthread, 1 worker × 16 threads: job/session state is in-process memory, so it must stay a single process)
Image processing ImageMagick 7.1.2-31, ExifTool, Pillow, potrace
Async pipeline ThreadPoolExecutor + BoundedSemaphore(4): no external queue required
Progress streaming Server-Sent Events (SSE) via /job/<id>/status
Frontend Vanilla HTML / CSS / JavaScript, zero build step (dark theme, DM Sans + DM Mono, inline SVG icon sprite)
Container Docker (multi-arch: amd64 + arm64)

Project structure

imaguick/
├── Dockerfile                        # Multi-arch container build
├── docker-compose.yml                # Compose deployment example
├── start.sh                          # Container entrypoint (cron + Gunicorn)
├── app.py                            # Flask application: routes and processing logic
├── cleanup.py                        # File cleanup script (stdout logging, Docker-compatible)
├── cleanup.sh                        # Manual cleanup helper
├── requirements.txt                  # Python dependencies
├── templates/
│   ├── base.html                     # Design system: CSS variables, header/nav, SVG icon sprite
│   ├── index.html                    # Upload page: Resize / Create GIF·WEBP tabs
│   ├── resize.html                   # Single-image resize options
│   ├── resize_batch.html             # Batch resize options
│   ├── gif_create.html               # Create an animation from a sequence of images
│   ├── gif_edit.html                 # Edit an existing animated GIF/WEBP
│   ├── progress.html                 # Real-time job progress (SSE): batch resize and GIF creation
│   ├── result.html                   # Success / error feedback
│   ├── _resize_options_styles.html   # Shared CSS partial for options-page layouts
│   └── _resize_form_fields.html      # Shared Jinja macros for repeated form fields
└── static/                           # Fonts, images, favicon

Batch processing pipeline

Browser                     Flask (Gunicorn)              ThreadPoolExecutor
  │                               │                              │
  ├─ POST /upload ──────────────> │                              │
  │                               │  save files, create job      │
  │ <─ {redirect: /progress} ─── │  submit tasks ─────────────> │
  │                               │                              │ acquire semaphore (max 4)
  ├─ GET /job/<id>/status (SSE) > │                              │ run ImageMagick
  │ <─ {file, status, pct} ────── │ <── update job dict ──────── │ release semaphore
  │ <─ {complete, zip} ─────────  │                              │
  ├─ GET /download_batch/<zip> ─> │                              │

GIF/WEBP creation reuses this same job/SSE machinery, running one ImageMagick process per frame (each counted toward the progress bar) followed by a single assembly pass over the normalised frames.

Security

  • All filenames sanitised with werkzeug.utils.secure_filename at route entry
  • Path traversal prevented by secure_path(): confines all file access to uploads/ and output/
  • Output formats validated against an explicit allowlist (ALLOWED_OUTPUT_FORMATS)
  • Sharpen level validated against ALLOWED_SHARPEN_LEVELS
  • Vector output formats checked for potrace availability before building the ImageMagick command
  • Resize/GIF dimensions are capped (MAX_DIMENSION, GIF_MAX_OUTPUT_DIMENSION) on both input and requested output, and GIF creation enforces a maximum frame count and combined pixel budget before any processing starts
  • SSRF prevented by is_safe_url(): DNS resolution + rejection of private/loopback/link-local IPs
  • Every subprocess call uses list-form arguments (never shell=True) and an explicit timeout
  • GitHub Actions workflows use minimal permissions: contents: read and SHA-pinned actions

Customisation

  • Supported formats: edit get_available_formats() in app.py
  • Resize options: extend build_imagemagick_command() in app.py
  • GIF/WEBP creation or editing: extend build_gif_frame_command() / build_gif_assemble_command() / build_gif_edit_command() / build_gif_extract_command() in app.py
  • Secret key: set the FLASK_SECRET_KEY environment variable (required in production)

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m 'Add my feature'
  4. Push: git push origin feature/my-feature
  5. Open a pull request

License

This project is licensed under the GNU General Public License v3.0: see the LICENSE file for details.

ImageMagick is licensed separately: see the ImageMagick license.


Made with ❤️ in Python

About

ImaGUIck is a free and open-source software, using ImageMagick®, used for editing and manipulating digital images. It can be used to edit or convert images, and supports a wide range of file formats, including JPEG, PNG, GIF, TIFF, PDF and RAW files.

Topics

Resources

Stars

30 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages