Skip to main content

Aggressive image optimizer cli!

Project description

Aggressive image optimizer cli

This CLI tries to bring all images to a size of 500kb without losing to much quality. You can see the results in this repo (HQ_unsplash1.jpg original to reduced unsplash1 copy.jpg). It uses pillow package to accomplish that.

Install

It's recommended to use pipx to install package, but pip should work as well.

pipx install aggimg

Usage

You can specify path to folder which contains images you want to shrink/optimize image size.

aggimg --path ./images

You can also don't specify the path and aggimg will look into current directory for images.

aggimg

Images that start with HQ_ prefix will ignored.

$: aggimg --path ./images
INFO - Trying to optimize ./images/unsplash1 copy.jpg
INFO - Reduced from 2222333 to 752461 which is a 66.14% reduction
INFO - Trying to optimize ./images/unsplash2 copy.jpg
INFO - Reduced from 1720129 to 478766 which is a 72.17% reduction
INFO - Trying to optimize ./images/unsplash3 copy.jpg
INFO - Reduced from 3054558 to 573479 which is a 81.23% reduction

Please note that images will be modified in place (overwritten).

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

aggimg-0.0.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

aggimg-0.0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file aggimg-0.0.2.tar.gz.

File metadata

  • Download URL: aggimg-0.0.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for aggimg-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8afa447877aea634437cfcc77c94dbf278c10af24d66873ff168dfba8f72b129
MD5 964a7584cf27553f912def5f1e7de7a9
BLAKE2b-256 a83f929d66303f0f7c580f5023004357816b6b430dc5f41d254a85e92203858a

See more details on using hashes here.

File details

Details for the file aggimg-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: aggimg-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for aggimg-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed0b1891068fb0584047359fee32edf12abb0877527be82cfa0e3e9efc6ce193
MD5 1e1a7fc54db3e1938c324d2b81507c35
BLAKE2b-256 59c48cbfe2cbb36e822867d9dcec398fb98acb50e3f50820172d6b83d36f9a1b

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