Image: possible new high-performance backend?

Created on 21 Sep 2016  路  9Comments  路  Source: Intervention/image

Hi, I've made a PHP binding for libvips. It's quite a bit faster than imagick or gd and generally needs much less memory. Would there be any interest in experimenting with a vips backend for Intervention\Image? I'd be happy to help, if I can.

The module is here:

https://github.com/jcupitt/php-vips

I made a tiny thing to benchmark it against imagick and gd:

https://github.com/jcupitt/php-vips-bench

On that test anyway it's at least 4x faster and needs at least 4x less memory. There are more benchmarks here:

https://github.com/jcupitt/libvips/wiki/Speed-and-memory-use

It's the library behind sharp, the popular high-performance image resize package for node.js:

http://sharp.dimens.io/en/stable/performance/

Of course, please close this issue if it's inappropriate.

Most helpful comment

Found one intervention driver here https://github.com/osiemsiedem/intervention-image-vips-driver

Not sure how to use it yet, it's undocumented, but still, it's a start

All 9 comments

I remembered another relevant benchmark. Carrierwave is one of the leading image uploading modules for Rails, and there is a vips backend. This repo benchmarks against rmagick and mini_magick:

https://github.com/stanislaw/carrierwave-vips-benchmarks

Those results are a bit old now, but on that typical uploader workload, vips is about 3x faster for jpg, 8x faster for png, and needs 4x less memory.

Last post on this, but php-vips is now at 1.0. The ext part is in pecl:

https://pecl.php.net/package/vips

so it's easier to install, the PHP layer is fully documented:

https://jcupitt.github.io/php-vips/docs/classes/Jcupitt.Vips.Image.html

and it's in production use on at least a couple of sites. libvips itself (the underlying image processing library) is used by wikipedia, tumblr, booking.com, etc. etc.

I'm interested to experiment with a vips backend for Intervention Image. If I got some spare time, I could try to implement a driver for vips into Intervention Image.

Self-disclosure:
We have used the Intervention Image library in the past for our image cache and resize proxy website but for peformance reasons we decided to switch to php-vips. Source code of our proxy can be found here.

+1

+1

Anyone started on this? :-)

There's a libvips imagine backend here:

https://github.com/rokka-io/imagine-vips

Might be relevant.

Found one intervention driver here https://github.com/osiemsiedem/intervention-image-vips-driver

Not sure how to use it yet, it's undocumented, but still, it's a start

Hi,

I have taken this under my radar and spent some time to implement missing commands. You can see the result in my fork:

https://github.com/Lustmored/intervention-image-vips-driver

I hope to get it merged into main package and then pursue upstreaming into intervention if there will be interest for that.

Any feedback would be very welcome :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kivivuori picture kivivuori  路  8Comments

theofidry picture theofidry  路  5Comments

cherrycoding picture cherrycoding  路  3Comments

ctf0 picture ctf0  路  4Comments

bkkrishna picture bkkrishna  路  7Comments