Closed (fixed)
Project:
ImageMagick
Version:
5.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Oct 2025 at 10:10 UTC
Updated:
5 Dec 2025 at 21:24 UTC
Jump to comment: Most recent
When calling the rotate operation through the image factory, the operation always fails because the "rotate" operation no longer exists following the work done in #3251438: Deprecate the Rotate operation class
Attempt to call the rotate method through the image factory while the imagemagick toolkit is being used:
// Sample snippet to showcase the failure.
/** @var \Drupal\Core\Image\ImageFactory $image_factory */
$image_factory = \Drupal::service('image.factory');
$image = $image_factory->get('public://image.jpg');
// This currently fails.
var_dump($image->rotate(90));
Use the rotate_ie operation defined in the image_effect module whenever the rotate operation is requested.
Provide issue fork.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
codebymikey commentedComment #4
mondrakeThanks
I wonder whether we should detect whether the
rotate_ieplugin is available before swapping the operation.Either way, we need a small test to prove this works and to prevent future regressions.
Comment #5
codebymikey commentedYes, or better yet, check if the
rotateplugin exists first, before falling back torotate_ie(just in case it's been implemented in a specific installation)Comment #6
codebymikey commentedCreated the tests, the CI config for 5.0.x needs updating in order to ensure tests can run.
Comment #7
mondrakeTests now work... but fail. It may be me having broken them...
Comment #9
mondrakeFixed the tests and committed to 5.0.x. Thanks.