We are using the modules Flysystem ( https://www.drupal.org/project/flysystem → ) and Flysystem S3 ( https://www.drupal.org/project/flysystem_s3 → ) to store images to AWS S3 bucket.
This works fine with the GD library but both Imagemagick and Imagick modules seem to struggle with these.
I applied the patch from https://www.drupal.org/project/imagick/issues/3018081 🐛 Using a remote file scheme does not work Needs review although it was originally for a different S3 module but I thought it could also help with the other S3 module.
The image seems to save fine but fails then with the following error:
Error: Call to a member function getImageFormat() on null in Drupal\imagick\Plugin\ImageToolkit\ImagickToolkit->save() (line 161 of /var/www/html/builds/rsync/drupal/web/modules/contrib/imagick/src/Plugin/ImageToolkit/ImagickToolkit.php)
Original error seems to come from the line:
$image_format = $resource->getImageFormat();
Then there are multiple similar errors when the file is not found:
Image scale failed using the imagick toolkit on s3://images/TestImage.jpg (, x)
Install both Flysystem and Flysystem S3 file storages and try to use the Imagick library to save the image styles and upload images.
Would be nice if the Imagick module would also support S3 remote storages and Flysystem.
Needs work
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.