PHPackages                             rokka/imagine-vips - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. rokka/imagine-vips

ActiveLibrary[Image &amp; Media](/categories/media)

rokka/imagine-vips
==================

libvips adapter for imagine

0.41.0(11mo ago)43564.1k↓14.1%8[7 issues](https://github.com/rokka-io/imagine-vips/issues)[3 PRs](https://github.com/rokka-io/imagine-vips/pulls)4MITPHPPHP ^7.2 || ^8.0CI failing

Since Nov 19Pushed 11mo ago4 watchersCompare

[ Source](https://github.com/rokka-io/imagine-vips)[ Packagist](https://packagist.org/packages/rokka/imagine-vips)[ Docs](https://github.com/rokka-io/imagine-vips)[ RSS](/packages/rokka-imagine-vips/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (28)Used By (4)

libvips adapter for Imagine
===========================

[](#libvips-adapter-for-imagine)

[![Static analysis](https://github.com/rokka-io/imagine-vips/actions/workflows/tests.yml/badge.svg)](https://github.com/rokka-io/imagine-vips/actions/workflows/tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/df5ad5c23b3826990f9e473b204927b458007356b0db6fec72ebc03731d3d314/68747470733a2f2f706f7365722e707567782e6f72672f726f6b6b612f696d6167696e652d766970732f76657273696f6e2e706e67)](https://packagist.org/packages/rokka/imagine-vips)

This package provides a [libvips](https://github.com/libvips/libvips) integration for [Imagine](https://imagine.readthedocs.io/en/latest/). The [VIPS image processing system](https://libvips.github.io/libvips/) is a very fast, multi-threaded image processing library with low memory needs.

Version 8.7 or higher of libvips is highly recommended. `paste` and `rotate` by angles other than multipliers of 90 are not supported with older versions of libvips.

You either need the [PHP FFI](https://www.php.net/manual/en/book.ffi.php) extension (recommended, since that's the currently supported way by the libvips maintainer) or the [php-vips-ext](https://github.com/libvips/php-vips-ext) extension version 1.0.8 or higher (you need to install that manually). And the [php-vips](https://github.com/libvips/php-vips) classes (automatically installed by composer)

The most (to us at least) important stuff is implemented. There may be edge cases, which are not covered yet, but those will be hopefully fixed soon. Report them, if you encounter one.

Even it this is not a 1.0.0 release yet, the library is somehow battle tested as we use it on [rokka.io](https://rokka.io).

Installation
------------

[](#installation)

Just run the following

```
composer require rokka/imagine-vips

```

and then you can use it like any other Imagine implementation with eg.

```
$imagine = new \Imagine\Vips\Imagine();

$size    = new Imagine\Image\Box(40, 40);
$mode    = Imagine\Image\ImageInterface::THUMBNAIL_INSET;

$imagine->open('/path/to/large_image.jpg')
    ->thumbnail($size, $mode)
    ->save('/path/to/thumbnail.png')

```

Missing stuff
-------------

[](#missing-stuff)

Needs vips 8.6 or higher:

- paste
- rotate by angles other than multipliers of 90

Not implemented yet

- Complete Drawer support, only text is.
- Methods:
    - fill
    - histogram
- Filters:
    - colorize

Most of them are not that important to us, so any contributions are welcome. Drawer for example may be a low hanging fruit, if you want to get into it.

### Layers and Animated gifs

[](#layers-and-animated-gifs)

If you have vips 8.7.0, layers and animated gifs should work like with imagick.

Saving files
------------

[](#saving-files)

Natively supported by libvips for saving are jpg, png, webp and tiff. If you have vips 8.7.0 with imagemagick support, it will use vips "[magicksave](https://libvips.github.io/libvips/API/current/VipsForeignSave.html#vips-magicksave)" for all other formats. It not, this adapter falls back to the Imagick or GD implementation.

Contribution
------------

[](#contribution)

Any contribution is very appreciated, just file an issue or send a Pull Request.

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance48

Moderate activity, may be stable

Popularity50

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 90.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~145 days

Recently: every ~243 days

Total

20

Last Release

348d ago

PHP version history (4 changes)0.0.1PHP ~7.0

0.13.0PHP ^7.0 || ^8.0

0.14.0PHP ^7.1 || ^8.0

0.20.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/803a02308898d7176ad6601cc9f1bc9b057a725d5b35f6c0c54995b02a97a977?d=identicon)[rokka](/maintainers/rokka)

---

Top Contributors

[![chregu](https://avatars.githubusercontent.com/u/47106?v=4)](https://github.com/chregu "chregu (202 commits)")[![alexander-schranz](https://avatars.githubusercontent.com/u/1698337?v=4)](https://github.com/alexander-schranz "alexander-schranz (16 commits)")[![devzzm](https://avatars.githubusercontent.com/u/1590943?v=4)](https://github.com/devzzm "devzzm (3 commits)")[![chmgr](https://avatars.githubusercontent.com/u/94837732?v=4)](https://github.com/chmgr "chmgr (1 commits)")[![ethaniel](https://avatars.githubusercontent.com/u/941973?v=4)](https://github.com/ethaniel "ethaniel (1 commits)")[![kdambekalns](https://avatars.githubusercontent.com/u/95873?v=4)](https://github.com/kdambekalns "kdambekalns (1 commits)")

---

Tags

image manipulationimage processingdrawinggraphicslibvipsvipsphp-vips

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rokka-imagine-vips/health.svg)

```
[![Health](https://phpackages.com/badges/rokka-imagine-vips/health.svg)](https://phpackages.com/packages/rokka-imagine-vips)
```

###  Alternatives

[imagine/imagine

Image processing for PHP

4.5k72.4M341](/packages/imagine-imagine)[pixelandtonic/imagine

Image processing for PHP

133.4M3](/packages/pixelandtonic-imagine)[intervention/image-driver-vips

libvips driver for Intervention Image

4495.5k6](/packages/intervention-image-driver-vips)[osiemsiedem/intervention-image-vips-driver

VIPS driver for Intervention Image.

2762.3k1](/packages/osiemsiedem-intervention-image-vips-driver)[orchestra/imagine

Imagine (Wrapper) Component for Laravel

70207.0k3](/packages/orchestra-imagine)[media-alchemyst/media-alchemyst

An Object Oriented wrapper for easy multimedia conversion, based on Imagine, FFMpeg, SwfTools, Unoconv and other libs

65216.4k1](/packages/media-alchemyst-media-alchemyst)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
