silverstripe / silverstripe-assets

Silverstripe Assets component
BSD 3-Clause "New" or "Revised" License
9 stars 67 forks source link

Run unit tests with vips as the driver for `intervention/image` #611

Open GuySartorelli opened 5 months ago

GuySartorelli commented 5 months ago

osiemsiedem/intervention-image-vips-driver provides a driver for libvips, which is a more efficient alternative to GD and Imagick for manipulating images.

There have been PRs in the past to allow libvips to work with Silverstripe CMS - but we don't run tests against it, so regressions could sneak in.

Getting libvips driver working

  1. Install libvips (e.g. sudo apt install libvips42)
  2. Add osiemsiedem/intervention-image-vips-driver (e.g. composer require osiemsiedem/intervention-image-vips-driver)
  3. Configure the libvips driver for intervention/image via yaml config:
    SilverStripe\Core\Injector\Injector:
      Intervention\Image\ImageManager:
        constructor:
          - { driver: Vips }

Acceptance criteria

maxime-rainville commented 5 months ago

We had some initial discussion with CreMarketing about this.

Vips looked like it could in theory be quite a cool improvement for generating images. Our own testing has been a bit more dubious.

Intervention 3 doesn't support it and doesn't seem inclined to support it. This would be a blocker for CMS 6 support.

Validation required: