Skip to main content

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).

Metadata

Release files for aggimg 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aggimg 0.0.2
File Size Uploaded Provenance
aggimg-0.0.2.tar.gz 3.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aggimg 0.0.2
File Interpreter ABI Platform
aggimg-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / aggimg-0.0.2.tar.gz

Download URL aggimg-0.0.2.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8afa447877aea634437cfcc77c94dbf278c10af24d66873ff168dfba8f72b129
BLAKE2b-256 checksum
How to use checksums
a83f929d66303f0f7c580f5023004357816b6b430dc5f41d254a85e92203858a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / aggimg-0.0.2-py3-none-any.whl

Download URL aggimg-0.0.2-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed0b1891068fb0584047359fee32edf12abb0877527be82cfa0e3e9efc6ce193
BLAKE2b-256 checksum
How to use checksums
59c48cbfe2cbb36e822867d9dcec398fb98acb50e3f50820172d6b83d36f9a1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Security for aggimg 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page