python-resize-image
A Small python package to easily resize images
What it is and what it does
python-resize-image wraps Pillow to provide a simpler API for common image resizing tasks. It offers six main functions: resize_crop (centered crop), resize_cover (fill and crop like CSS background-size: cover), resize_contain (fit without crop like CSS background-size: contain), resize_width, resize_height, and resize_thumbnail. Each function accepts an image object and size parameters, with optional validation to prevent upscaling and optional resampling filters.
The package is straightforward to use—you open an image, pass it to one of the resize functions, and save the result. It includes a validation layer that checks whether a resize is safe before executing it, and allows you to decouple validation from the actual resize operation. However, the project has been unmaintained since 2021-11-04, so it may have compatibility issues with newer Python or Pillow versions.
Use it for:
- Generate thumbnail images for web galleries while preserving aspect ratio and avoiding upscaling.
- Crop images to a fixed size from the center for consistent social media post dimensions.
- Resize images to fit a bounding box without distortion, adding padding as needed.
- Batch-process images to specific widths or heights while maintaining their original proportions.
- Validate whether an image can be safely resized before performing the operation in a pipeline.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides functions to resize images using Pillow, supporting crop, cover, contain, and dimension-based resizing modes with optional validation.
Yes, if you need simple image resizing and are working with a stable Python and Pillow environment. The API is clean and the MIT license is permissive. However, be cautious: the package is abandoned (last commit 2021-11-04), so test thoroughly with your specific versions before relying on it in production. For new projects, consider whether a maintained alternative better suits your needs.
Install
python-resize-image on PyPI
pip
pip install python-resize-imageuv
uv add python-resize-imagepoetry
poetry add python-resize-imageInstalling python-resize-image
Before you install
Low install friction with just two runtime dependencies (Pillow and requests). However, the package is abandoned—last commit was 2021-11-04, over 1744 days ago. No active maintenance means security updates and compatibility fixes are unlikely.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute freely with minimal restrictions. No commercial or proprietary concerns.
Quickstart
pip install python-resize-image
from PIL import Image
from resizeimage import resizeimage
with open('image.jpg', 'r+b') as f:
with Image.open(f) as image:
resized = resizeimage.resize_cover(image, [200, 100])
resized.save('output.jpg', image.format)
Requires Pillow 2.7 or later; image file must be readable and in a format Pillow supports.
Verify before relying
- Whether the package works reliably with modern Python versions despite being abandoned since 2021.
- Current state of compatibility with recent Pillow versions beyond what the documentation specifies.
- Whether the requests dependency is actually used or is a vestigial import.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — Pillow, requests |
| Maintenance | abandoned — 1,744 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,266/month — #14,172 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_resize_image-1.1.20-py2.py3-none-any.whl
Keywords: image, resize, resizing, python
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
pilkitPILKit provides a collection of image…
permissive · top 15,000 on PyPI
simple-lama-inpaintingPerforms image inpainting using the LaMa model,…
unclear · top 15,000 on PyPI
WillowWillow provides a unified API for image…
permissive · top 5,000 on PyPI
easy-thumbnailsGenerates and manages thumbnail images for…
permissive · top 15,000 on PyPI
pillow-jxl-pluginRegisters JPEG-XL codec support with Pillow,…
unclear · top 15,000 on PyPI
resize-rightResizes images or tensors in NumPy or PyTorch…
permissive · top 15,000 on PyPI
pdf2imageConverts PDF files to PIL Image objects by…
permissive · top 1,000 on PyPI
sorl-thumbnailGenerates and caches image thumbnails for…
permissive · top 15,000 on PyPI
blend-modesImplements blend modes (soft light, dodge,…
permissive · top 15,000 on PyPI
pyoxipngpyoxipng reduces PNG file sizes through…
permissive · top 15,000 on PyPI