Skip to main content

A PIL based image optimizer

Reason this release was yanked:

Use a newer version! This version won't work.

Project description

image-optimizer-cli

A simple CLI application written in Python to optimize images. You can use it from the command line after installing it. Executable name is image-optimizer.

Installation

Run:  pip install image-optimizer-cli

Usage

  • Show help: image-optimizer -h

  • Optimize single image: image-optimizer -p /path/to/image.jpg

  • Optimize all images in a folder: image-optimizer -p /path/to/images/

  • Optimize all images in a folder recursively: image-optimizer -p /path/to/images/ -r

  • Optimize a number of images: image-optimizer -p /path/to/images/ -n 10

  • Optimize with custom quality: image-optimizer -p /path/to/images/ -q 30

Parameters

  • -h, --help: Show help.

  • -p, --path: Path to the image or folder to optimize. Defaults to the current directory if not specified.

  • -r, --recursive: Optimize all images in a folder recursively. Defaults to False if not specified.

  • -n, --number: Optimize a number of images. Defaults to all images in the folder if not specified.

  • -q, --quality: Optimize with custom quality. Defaults to 80 if not specified.

Important notes

  • BACKUP YOUR IMAGES BEFORE OPTIMIZING! All images will be overwritten with optimized versions.

  • This is a simple CLI application. It is not meant to be a full-featured image optimizer.

  • Relative and absolute paths are supported.

  • The quality parameter is a value between 0 and 100.

  • The number parameter is a positive integer. And is not required.

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

image-optimizer-cli-2022.2.19.tar.gz (14.9 kB view details)

Uploaded Source

File details

Details for the file image-optimizer-cli-2022.2.19.tar.gz.

File metadata

  • Download URL: image-optimizer-cli-2022.2.19.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for image-optimizer-cli-2022.2.19.tar.gz
Algorithm Hash digest
SHA256 d7446e9fe23d2fa270e2814d01e173c3245f80df49dbf05daa3dc89e7169a722
MD5 1c49c8934483170369f723bb69e70f8a
BLAKE2b-256 21468a889f503a34c66389a9de50b23f6d15d4b48a0e0167105ae157342ad098

See more details on using hashes here.

Supported by

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