A simple CLI tool to compress images directly from your terminal.
Just open a terminal in your image folder, type imgc, and save some space.
-
Clone the repository
git clone https://github.com/k3vndev/img-compress cd img-compress -
Install dependencies (Make sure you have UV installed)
uv sync
-
Install the tool globally This makes the
imgccommand available from anywhere:pip install .
Navigate to the folder where your images are located and run:
imgcThis will compress all the valid images in that folder with default settings to a new folder ./imgc_output.
| Argument | Description | Example |
|---|---|---|
filter-formats |
Compress only from specific image formats | filter-formats:png,jpg |
format |
Set the format to compress to | format:webp |
name |
Set the output name or name sequence | name:vacations-[i] |
quality |
Set the compressed images quality | quality:40 |
If you ever want to remove it:
pip uninstall img-compress