imgp: a batch image resizer and rotator for the terminal
:camera_flash: Fast batch image resizer and rotator
At a glance
- What is it?
- imgp is a standalone Python script that resizes and rotates thousands of JPEG, PNG and WEBP files at once, using multiprocessing and optionally Pillow-SIMD for the hot loop. It suits someone with a directory of photos to shrink, and its adaptive mode and megapixel targets are the two options that make it more than a resize wrapper.
- Who is it for?
- Adopt imgp if you have a folder of images to shrink and want something faster than a file manager extension or a per-file ImageMagick call, and you want the output decided by resolution, percentage or megapixel target. Skip it if your images need anything beyond geometric transforms, since the tool is a resizer and rotator, not an editor.
- Can I use it commercially?
- Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
- Is it still maintained?
- Yes. The repository last received commits 19 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
What imgp is for
imgp is a command line image resizer and rotator for JPEG, PNG and WEBP images, and it can resize or thumbnail and rotate thousands of images in a go while saving significantly on storage. The stated intent is specific and worth repeating, because it explains the design. imgp intends to be a stronger replacement of the Nautilus Image Converter extension, not tied to any file manager and much faster, and on desktop environments such as Xfce or LxQt which do not integrate Nautilus, it aims to save the day. That is a specific gap, an image converter for people whose file manager does not ship one, and the tool is designed around that job rather than around being a general image processing program. The primary language is Python, the licence is GPL-3.0-or-later, the last push was on 2026-10-04, and the releases are v3.0 on 2026-08-16, v2.9 on 2023-09-10 and v2.8 on 2020-11-30.
Adaptive mode, which is the option that matters
The adaptive mode is the most interesting design decision in the tool, and the README explains it with a worked example. If the specified and the image orientations are the same, meaning the specified height is greater than or equal to the width and the image height is greater than the width, or the reverse, the image is resized with the longer specified side as reference. In the cross orientation case, where the specified and image orientations disagree, the image is resized with the shorter specified side as reference, which is the same as non-adaptive behaviour. The example is an image of 2048x1365 resized to 1366x768. In regular mode, which is the default, the output is 1152x768, so the image was shrunk further than asked in order to hit the exact height. In adaptive mode the output is 1366x910, so the width is honoured and the height follows from the aspect ratio. For a mixed batch of portrait and horizontal photos, that difference is the difference between every image being the size you asked for and half of them being smaller than you expected.
The option list
The usage line is dense but the options are simple, and each one is a boolean switch or a value. The positional argument is PATH, the source file or directory, defaulting to the current directory. The output resolution is given with `-x res` or `--res res`, in HxV form, as a percentage with a percent suffix, or as a megapixel target with an MP suffix. Rotation is `-o deg` or `--rotate deg`, clockwise. `-a` or `--adapt` turns on adaptive resizing. `-c` or `--convert` converts PNG or WEBP to JPG. `-e` or `--eraseexif` erases the EXIF metadata, and `-f` or `--force` forces the exact specified resolution. There are also switches for hidden dot files, optimisation, JPEG quality and a minimum image size in bytes, and overwriting the source image, and the usage block in the README is long enough to hold the full list. The underlying library is PIL and Pillow, and the setup script selects pillow-simd automatically when it is already installed.
Where the speed comes from
The performance story has three parts and the README names all three. It is powered by multiprocessing, it uses SIMD parallelism thanks to the Pillow-SIMD library, and it has an intelligent adaptive algorithm. The parallel part is why a batch of thousands is not painful, since the work is embarrassingly parallel across files. The SIMD part is why the per-file cost is low, and the README points at the pillow-simd benchmarks for a comparison. The stated figure is that imgp could resize 8823 images, approximately 4.5GB of mixed resolutions from high to regular, stored on a USB 2.0 external hard disk, at an adaptive resolution of 1366x1000, in around 8 minutes, producing 897MB of output at approximately 20% of the original size. The comparison baseline is the Nautilus Image Converter, which calls the convert utility from ImageMagick. Note the storage context, because an external USB 2.0 disk is a slow input and the figure was produced on it.
Installing it
imgp requires Python 3.10 or later, and the only dependency is the PIL library. On Ubuntu you can install it with `sudo apt-get install python3-pil`, or with `sudo pip3 install pillow`, and pillow can be replaced by pillow-simd on SIMD processors. The package manager route is the simplest, and if the version available in your repository is dated the documentation suggests an alternative method. Unlisted packagers include a Homebrew tap with `brew install jarun/imgp/imgp`, PyPI with `pip3 install imgp`, and Source Mage with `cast imgp`. Release packages for Arch Linux, CentOS, Debian, Fedora, openSUSE Leap and Ubuntu are attached to the latest stable release. From source you clone or download the archive and run `sudo make install` to install to the default location of `/usr/local`, with `sudo make uninstall` to remove it, and `PREFIX` is supported if you want a different location.
Running it standalone, and the man page
imgp is a standalone utility, and the README shows the simplest possible invocation, running `./imgp` from the containing directory, with no installation at all. The repository root is small and shows the structure: an `imgp` file which is the script itself, an `imgp.1` man page, a `setup.py`, a `Makefile`, an `auto-completion/` directory, plus the usual project files. The Makefile installs three things, the binary into `$(BINDIR)`, the gzipped man page into `$(MANDIR)`, and the README into `$(DOCDIR)`, with the paths derived from `PREFIX` which defaults to `/usr/local` and supports `DESTDIR` for packaging. The test target is as simple as it gets, it runs `./imgp --help`, which at least confirms the script parses. Shell completion scripts for Bash, Fish and Zsh live in the auto-completion subdirectories, and the README points at your shell's manual for installing them.
Where the tool stops
The boundaries are the ones implied by a resizer. The tool does resizing, rotation, format conversion between PNG, WEBP and JPEG, optimisation, EXIF preservation or erasure, and recursion over directories. It does not crop, it does not convert to other formats, it does not apply filters, and it does not composite. The reason this matters is that the set of operations you can express in a single command is small, and a workflow that needs a crop step, a watermark and a conversion is a workflow that needs a real tool. There is also the usual caveat about the underlying library. imgp sits on Pillow, and pillow-simd can replace Pillow on SIMD processors, so the SIMD route means installing that package instead. And the `convert` option drops PNG or WEBP to JPEG, which is a lossy step for images with transparency, so a batch that includes alpha PNGs should be processed in batches that separate them.
Editorial conclusion
Adopt imgp if you have a folder of images to shrink and want something faster than a file manager extension or a per-file ImageMagick call, and you want the output decided by resolution, percentage or megapixel target. Skip it if your images need anything beyond geometric transforms, since the tool is a resizer and rotator, not an editor. Before installing, check that you have Python 3.10 or later and a Pillow or Pillow-SIMD build, because the SIMD variant is what makes the throughput claim hold, and prefer the package manager or release packages over installing from source, since packaged releases are available through PyPI and the distribution repositories.
Frequently asked questions
What does adaptive mode do in imgp?
When the specified and image orientations are the same, the image is resized using the longer specified side as reference; in the cross orientation case it uses the shorter specified side, the same as non-adaptive. An image of 2048x1365 resized to 1366x768 comes out 1152x768 in regular mode and 1366x910 in adaptive mode.
How do I install imgp?
Python 3.10 or later is required along with Pillow. Use your package manager, PyPI with `pip3 install imgp`, the Homebrew tap with `brew install jarun/imgp/imgp`, or the release packages for Arch, CentOS, Debian, Fedora, openSUSE Leap and Ubuntu. From source, `sudo make install` puts it under /usr/local and PREFIX is supported.
What image formats does imgp support?
JPEG, PNG and WEBP for resizing and rotation, with an option to convert PNG or WEBP to JPG, to erase EXIF metadata, to set the output JPEG quality, and to force the exact specified resolution.
How does imgp get its speed?
It combines multiprocessing across files with SIMD parallelism from the Pillow-SIMD library and an adaptive resizing algorithm. The README reports resizing 8823 images of about 4.5GB from a USB 2.0 external disk to an adaptive 1366x1000 in around 8 minutes, producing 897MB of output.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/jarun-imgp)Was this useful?