pyvips
binding for the libvips image processing library
What it is and what it does
pyvips is a Python wrapper around libvips, a C image processing library designed for speed and memory efficiency. Instead of loading entire images into memory, it builds pipelines of operations that stream image data in parallel from source to destination in sections. This architecture makes it substantially faster and more memory-efficient than alternatives for common tasks such as resizing, sharpening, and format conversion.
The package can operate in two modes: API mode (faster, requires libvips development headers and a C compiler to build a binary extension) or ABI mode (slower startup and ~20% runtime penalty, requires only the libvips shared library). It supports Python 3.7 through 3.14 and runs on Windows, macOS, and Linux. The fact sheet indicates active maintenance and no known vulnerabilities.
Use it for:
- Batch resize or transform large image collections with minimal memory footprint.
- Build image processing pipelines that apply multiple filters or conversions in a single pass.
- Process high-resolution TIFF or other large image formats where keeping the full image in memory is impractical.
- Integrate fast image operations into web services or data processing workflows.
- Scientific or research applications requiring efficient image manipulation and analysis.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python binding for libvips, a streaming image processing library that builds pipelines of operations and executes them in parallel with low memory overhead.
Yes, if you need fast, memory-efficient image processing and are willing to install libvips as a system dependency. High install friction (external library requirement) is the main trade-off, but performance and memory gains are substantial. No known security vulnerabilities and active maintenance make it a solid choice. Not suitable if you need a zero-dependency image library or if system-level package installation is not feasible.
Install
pyvips on PyPI
pip
pip install pyvipsuv
uv add pyvipspoetry
poetry add pyvipsInstalling pyvips
Before you install
High install friction: requires libvips shared library (version 8.2 or later, 8.9+ for full features) to be present on the system. Can build a faster API mode extension if development headers and a C compiler are available, otherwise falls back to slower ABI mode (~20% slower in execution). Binary installation option available but with reduced feature set.
License in practice
MIT license (permissive) means you can use, modify, and distribute freely in commercial and private projects with minimal restrictions, provided you include the license notice.
Quickstart
pip install pyvips
import pyvips
image = pyvips.Image.new_from_file('input.jpg')
image = image.resize(0.5)
image.write_to_file('output.jpg')
libvips shared library must be installed on the system (e.g., via apt, brew, or conda) and discoverable by the system library loader; on Windows, may require manual PATH configuration or use of os.add_dll_directory().
Verify before relying
- Whether the ~20% performance penalty of ABI mode is acceptable for your workload.
- Exact feature gaps in the binary installation beyond what is documented.
- Whether cffi API mode will be available on your specific platform and Python version.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | high — source build required |
| Runtime dependencies | 1 — cffi |
| Maintenance | actively maintained — 248 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 708,339/month — #5,265 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyvips-3.1.1.tar.gz
Keywords: image, processing
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
pyvips-binaryProvides pre-built binary wheels of libvips and…
copyleft · top 15,000 on PyPI
wgpuwgpu-py provides a Python binding to WebGPU, a…
permissive · top 15,000 on PyPI
crickCrick provides approximate and streaming…
permissive · top 15,000 on PyPI
aiomultiprocessCombines AsyncIO and multiprocessing to run…
permissive · top 5,000 on PyPI
img2pdfConverts raster images to PDF without…
copyleft · top 5,000 on PyPI
python-ffmpegProvides a Python binding for FFmpeg with both…
permissive · top 15,000 on PyPI
openslide-pythonOpenSlide Python provides a Python interface to…
copyleft · top 15,000 on PyPI