Problem/Motivation

The module appears to only be compatible with GD2 Image Toolkit. If you are using another toolkit, such as ImageMagick, it throws an error when you try to create a new image style that uses this effect. (The error was something along the lines of:
Call to undefined method getResource on null in docroot/modules/contrib/imagemagick/src/Plugin/ImageToolkit/ImagemagickToolkit.php

Steps to reproduce

Install the ImageMagick toolkit module. https://www.drupal.org/project/imagemagick
Enable the ImageMagick toolkit on /admin/config/media/image-toolkit.
Create a new Image Style that uses the Image Scale and Fill effect.
Try to save the style - an error will be thrown.

Proposed resolution

At a minimum, it should be clearly documented on the module page what Image toolkits are supported.

To add support in the future, you'll likely need to refactor the code to only call Image Toolkit methods that are defined in \Drupal\Core\ImageToolkit\ImageToolkitOperationManagerInterface. It seems that the getResource() method is unique to the GD2 toolkit and not part of the interface definition.

Comments

nplowman created an issue. See original summary.

  • vimaljoseph committed cd9993c8 on 1.0.x
    Issue #3465565 by nplowman: Add toolkit check for GD2 image toolkit...
vimaljoseph’s picture

Status: Active » Fixed

Currently the module support only GD. Committed to 1.0.x (1.0.x-dev). Added toolkit capability check for GD2 compatibility. Will update the project description. Please create a separate ticket if ImageMagick support is required. Will consider that in an upcoming sprint. As this ticket talks about the specific error, which is fixed, we can consider this as closed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.