Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

Vips (libvips)

1 sites No security coverage
View on drupal.org

This module provides faster and more memory-efficient image processing for Drupal by integrating the libvips library. It is designed to out-perform Drupal's default GD and the ImageMagick module, especially for large images, using significantly less memory.

Provides libvips as a fast, memory-efficient image processing toolkit for Drupal. An alternative to GD and ImageMagick, typically 4× faster and using 10× less memory for common image operations. Requires only Drupal core — no contrib dependencies.

Features

  • Fast spatial operations — resize, crop, and rotate are 3–50× faster than ImageMagick for large source images, thanks to libvips’s shrink-on-load pipeline which never materialises the full pixel buffer.
  • Low memory footprint — 2–4× less peak RAM than ImageMagick for operations requiring the full decoded image. Lower per-request memory means more concurrent image style generations before PHP-FPM workers become the bottleneck.
  • Streaming format conversion — converting JPEG to WebP reads and encodes in strips without holding the full image in memory.
  • AVIF read/write support — requires the libheif AOM encoder system plugin for writing.
  • Configurable JPEG quality — single setting, default 75.
  • No contrib dependencies — integrates with Drupal core’s image toolkit plugin system only.

Strong fit — use libvips when:

  • Source images are large (DSLRs, high-res uploads). libvips uses JPEG shrink-on-load: it instructs the decoder to work at a reduced scale so the full pixel buffer is never materialised. At 8000×5333 it is 3× faster than GD for thumbnailing and 50× faster than ImageMagick, which always decodes the full image first.
  • Memory is constrained. For operations that need the full image (rotate, format conversion) libvips uses 2–4× less peak RAM than ImageMagick and meaningfully less than GD.
  • Throughput matters more than any single request. The combination of speed and low memory means more concurrent derivatives can be generated without hitting memory limits or queuing.
  • You are generating many image styles. The gains compound: a site with 10 image styles on a 20 MP upload processes all 10 in the time ImageMagick needs for one.

Not a fit — prefer GD or ImageMagick when:

  • PHP FFI is unavailable (some shared hosts disable it). GD is always present.
  • You need operations not yet implemented in this module (watermarking, ICC profile conversion, advanced compositing). ImageMagick covers the widest feature set.
  • Colour accuracy is critical. libvips and GD use different interpolation and gamma handling. For most editorial images the difference is invisible; for scientific or print workflows, validate output carefully.

Performance

Benchmarked against an 8000×5333 JPEG source (~880 KB), 5 iterations per operation (PHP 8.4, DDEV/Docker). Full benchmark script available as a GitHub Gist.

Speed (ms, lower is better):

Operation GD ImageMagick libvips Resize to thumbnail (200×133) 90 ms 1407 ms 28 ms Scale and crop (800×600) 131 ms 288 ms 60 ms Rotate 90° 1067 ms 810 ms 387 ms Convert JPEG → WebP 3060 ms 3183 ms 3225 ms

Peak memory RSS (lower is better):

Operation GD ImageMagick libvips Resize to thumbnail n/a n/a n/a Scale and crop n/a n/a n/a Rotate 90° 400 MB 563 MB 153 MB Convert JPEG → WebP 473 MB 555 MB ~0 MB

libvips is fastest for all spatial operations. WebP conversion is I/O-bound at this scale — all three toolkits land within 5% of each other. Resize and crop use libvips’s shrink-on-load pipeline, which never materialises the full pixel buffer. The WebP memory result demonstrates libvips’s demand-driven streaming architecture: it reads and encodes in strips without ever holding the full image in memory.

Post-Installation

After enabling the module:

  1. Go to Administration → Configuration → Media → Image toolkit (admin/config/media/image-toolkit).
  2. Select libvips image manipulation toolkit and save.
  3. Optionally adjust the JPEG quality setting (0–100, default 75).

Check Administration → Reports → Status report (admin/reports/status) to confirm libvips is detected and all requirements are met. The status report will flag a missing libheif AOM encoder if AVIF write support is unavailable.

Additional Requirements

  • libvips system library ≥ 8.x — e.g. libvips42 on Debian/Ubuntu. See the official install guide for macOS (Homebrew), Windows, and other distributions.
  • PHP FFI extension — add extension=ffi and ffi.enable=true to php.ini and restart PHP-FPM.
  • jcupitt/vips PHP library ≥ 2.0 — install via composer require jcupitt/vips.
  • libheif AOM encoder plugin (e.g. libheif-plugin-aomenc on Debian/Ubuntu) — required for writing AVIF. All default Drupal image styles include an AVIF conversion step, so image style generation will fail without this package.

No additional modules are required or recommended. The module integrates directly with Drupal core’s image toolkit and image styles system.

Similar projects

  • GD (Drupal core built-in) — always available, no extra dependencies, suitable for small images. Slower for large source images and uses more memory for format conversion.
  • ImageMagick module — widest feature set (watermarking, ICC profiles, advanced compositing). Significantly slower and more memory-hungry for spatial operations on large images. Best choice when advanced features are needed.

libvips fills the gap between GD (lightweight, limited) and ImageMagick (full-featured, heavy): it covers all standard Drupal image style operations with the best performance and memory profile of the three.

Supporting this Module

Contributions, bug reports, and feature requests are welcome via the project issue queue.

Community Documentation

Activity

Total releases
2
First release
Feb 2026
Latest release
4 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0 Stable Feb 21, 2026
1.0.x-dev Dev Feb 20, 2026