Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vips driver #1119

Open
anshu8858 opened this issue Oct 29, 2021 · 12 comments
Open

Add vips driver #1119

anshu8858 opened this issue Oct 29, 2021 · 12 comments
Assignees

Comments

@anshu8858
Copy link

Please add vips for driver. It takes less RAM.
Stack Overflow
PECL

@mstaack
Copy link

mstaack commented Jan 4, 2022

try this, works well for me:

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

@jcupitt
Copy link

jcupitt commented Dec 8, 2023

Hello, I had a quick look at that driver and made an issue with a couple of things I spotted: osiemsiedem/intervention-image-vips-driver#27

might be useful.

@mstaack
Copy link

mstaack commented Jan 25, 2024

@jcupitt oh great, thanks

@ARehmanMahi
Copy link

I would advise against the osiemsiedem driver. The maintainer doesn't cooperate with intervention devs & doesn't even reply to the other maintainers of the vips libs itself @jcupitt. Thinks intervention is dead yet tries to have an adapter for the "dead" lib.

There have been talks of such adapters for 5 some years. Yet no progress on it. Seems like a lost cause.
I'm just a junior php dev, please don't come at me with PRs lol.

Intervention & vips are both amazing projects. Would love to have them working together.

@jcupitt
Copy link

jcupitt commented Feb 10, 2024

The osiemsiedem driver is MIT licenced, so it could be forked and maintained by intervention, if necessary. I'm not offering to do the work myself, of course ahem

@ARehmanMahi
Copy link

The osiemsiedem driver is MIT licenced, so it could be forked and maintained by intervention, if necessary. I'm not offering to do the work myself, of course ahem

That is why I'm going to remove Intervention and directly use vips-php, not that difficult to use standalone.

@olivervogel
Copy link
Member

olivervogel commented Feb 12, 2024

That is why I'm going to remove Intervention and directly use vips-php, not that difficult to use standalone.

I agree. Intervention Image is basically just a layer of comfort and convenience. If one intend to use only VIPS (or any other processor) anyway, there is no reason not to the this processor directly.

@GuySartorelli
Copy link

GuySartorelli commented Jul 11, 2024

https://github.com/osiemsiedem/intervention-image-vips-driver is outdated now - hasn't been updated for the v3 rewrite.

I'm interested in trying my hand at adding vips support natively to intervention/image - but that's obviously a massive undertaking and I'll need a fair amount of support and review to get going.

@olivervogel If I were to tackle this, what would be your preferred approach?
Would you be open to having a vips branch, and I can target incremental PRs to that branch to slowly build up the feature?
Would you prefer I open a PR targetting the 'develop' branch, and have it in draft with incremental commits in that same PR?
Would you rather I not open a PR until the feature is 100% complete?

There is of course always the option of saying "intervention/image will not have native vips support" which is a valid stance to take since it will add a lot of additional code to maintain.

And before it's suggested: I'm not personally interested in making a third-party module which adds support.

@olivervogel
Copy link
Member

olivervogel commented Jul 11, 2024

I have often thought about integrating Vips as a third driver and love the idea to have such a tool.

This driver would however definitely create a new dependency with php-vips. For this reason I don't think it's a good idea to integrate it directly into intervention/image. I want to prevent the Vips PHP Binding Composer Package jcupitt/vips from being always automatically installed, even if the user does not intend to use Vips.

In my opinion, a better solution is to build the Vips driver as an official external package like intervention/image-driver-vips for example. This could then be installed optionally and potentially unused dependencies could be avoided.

I already started with the implementation, but haven't made much progress yet. Everything is still in a very early stage and I would call it rather a case study to see how I can best integrate vips. There are no tests yet either.

I'm still not sure if all the features I've implemented for GD and Imagick will work with Vips. A first goal might be to implement at least the image resizing functions for a Vips driver and writing tests for the features implemented so far.

I put the current state into a public repository today, but it is not yet listed on Packagist. The driver is able to read (animated) images, do simple image resizing with resize() and encode in Jpeg and GIF format.

If anyone is interested, the repository can be used as a base to continue working on it. Since this is a project independent of the main repository and the progress is still very early and WIP, any small changes and also larger features can be submitted as PR to the external vips driver repository (https://github.com/Intervention/image-driver-vips). I do not expect anything to be complete and fully functional yet.

@jcupitt
Copy link

jcupitt commented Jul 11, 2024

The upcoming libvips 8.16 has a new chapter in the docs with a developer checklist:

https://github.com/libvips/libvips/blob/master/doc/Developer-checklist.md

It tries to give some general guidelines for designing things that use libvips. It might be helpful.

@binaryfire
Copy link

Hi @olivervogel. Thanks for all your hard work on Invervention.

I noticed you've made a few recent commits to the vips extension. I'm about to begin work on a high traffic image-focused PHP app and deciding between using php-vips directly or sticking with Intervention. In July you mentioned it was an experiment- has that changed and do you plan to release it as a production-ready extension?

@olivervogel
Copy link
Member

has that changed and do you plan to release it as a production-ready extension?

Unfortunately not. There is currently no schedule or date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants