skillfed

python-resize-image

A Small python package to easily resize images

python-resize-image v1.1.20 82.3K downloads/30d#14,172 on PyPI182
Permissive license MIT Abandoned released

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-image

uv

uv add python-resize-image

poetry

poetry add python-resize-image

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Software Development :: Libraries :: Python Modules

Tags

image resizing librarycrop and resize imagesPillow image manipulationbackground-size cover containaspect ratio preserving resizeimage thumbnail generationbatch image scaling
image-processingpillow-wrapper

More Python Modules packages