Skip to main content

A fast, resilient CLI for batch image resizing, conversion, and compression.

Project description

Resizy

PyPI Python License: MIT CLI: Typer Terminal UI: Rich

Resizy is a fast, production-minded CLI for batch image resizing, conversion, and compression. It keeps the terminal responsive with ProcessPoolExecutor, validates images before processing, and gives every run a polished Rich progress UI.

Resizy terminal demo

Resizy summary

Why Developers Like It

  • Resize, convert, and compress hundreds of images from one command.
  • Keep your shell readable with Rich progress bars, panels, and summaries.
  • Avoid heavyweight services. No Docker, Redis, Celery, or background daemon.
  • Install globally with pipx, isolated from your app dependencies.
  • Gracefully handles corrupted files, invalid formats, and partial failures.

Install

pipx is recommended because it installs Resizy as a global terminal command while keeping its dependencies isolated from your projects.

If you already have pipx:

pipx install resizy

If pipx is not installed yet:

python -m pip install --user pipx
python -m pipx ensurepath

Close and reopen your terminal, then run:

pipx install resizy

On Windows, if python is not available but the Python launcher is:

py -m pip install --user pipx
py -m pipx ensurepath
pipx install resizy

Before Resizy is published to PyPI, install it locally from the repository:

git clone https://github.com/mwlyra/resizy.git
cd resizy
pipx install .

For local development:

pip install -e ".[dev]"

Run the test suite:

pytest

Usage

Convert the demo images to compact WebP files:

resizy run ./examples/images --format webp --width 1000 --quality 82 --output ./examples/output

Convert JPEG and PNG assets to WebP with smart compression:

resizy run ./images --format webp --quality 82

Process nested folders with more workers:

resizy run ./assets --recursive --workers 8 --format webp --width 1920

Write outputs to a specific directory:

resizy run ./campaign --output ./dist/images --width 1200 --quality 76

Resize a single file:

resizy run ./hero.png --format jpeg --width 2400 --quality 88

Delete originals after successful processing:

resizy run ./raw --format webp --cleanup-originals

CLI Options

resizy run --help

Common flags:

  • --width, --height: Resize while preserving aspect ratio.
  • --format: Convert to jpeg, png, webp, bmp, or tiff.
  • --quality: Compression quality from 1 to 100.
  • --workers: Number of background worker processes.
  • --recursive: Scan directories recursively.
  • --output: Choose the output directory.
  • --overwrite: Replace existing output files.
  • --preserve-metadata: Preserve EXIF metadata when supported.
  • --cleanup-originals: Remove source files after successful processing.

Architecture

Resizy is intentionally small and scalable:

  • cli.py owns command parsing and terminal presentation.
  • processor.py owns validation, image operations, and process-pool orchestration.
  • config.py centralizes supported formats, defaults, and package settings.

The main process stays responsive while CPU-bound image work runs in isolated worker processes. Results are streamed back as each file completes, so users get real-time feedback instead of a frozen terminal.

Supported Inputs

Resizy accepts JPEG, PNG, WebP, GIF, BMP, and TIFF images. Each file is opened and verified with Pillow before processing so corrupted or unsupported files fail gracefully in the summary table.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

resizy-0.1.1.tar.gz (10.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

resizy-0.1.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file resizy-0.1.1.tar.gz.

File metadata

  • Download URL: resizy-0.1.1.tar.gz
  • Upload date:
  • Size: 10.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for resizy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 429b6f246a09fc7fa233a11fe5fa84f80e55dda75bb1a06957960ee3c9577587
MD5 3090f344a2812f67082557463e52f6a4
BLAKE2b-256 8f71e3bee1a5c9261820afababe28b313a6b9914788aba2479a168e8f6b02c2e

See more details on using hashes here.

File details

Details for the file resizy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: resizy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for resizy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9bca97c08f5ec52e17a812518168d4334bddd3e9855bdaaf98317414d411930b
MD5 8feb381bd6b59a1cced9c60751b4bfdd
BLAKE2b-256 c11db33f8055429f033a1131d5518991afd1bd99f62aa7d8b67301bb10936feb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page