I am using image manipulation TCA type to handle multiple crop variants(https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/8.6/Feature-75880-ImplementMultipleCroppingVariantsInImageManipulationTool.html). But when a user edits and saves the image, the cropped version of the image is not getting saved and also I am not able to fetch the cropped image.

While debugging that, I tried TYPO3 image test. But getting following error for multiple operations.

Image generation failed ImageMagick / GraphicsMagick handling is enabled, but the execute command returned an error. Please check your settings, especially ['GFX']['processor_path'] and ['GFX']['processor_path_lzw'] and ensure Ghostscript is installed on your server.

I checked the path is right and Ghostscript is also installed on the server.

Code to integrate mobile image manipulation

 'config' => [
                 'type' => 'imageManipulation',
                 'cropVariants' => [
                     'mobile' => [
                         'title' => 'LLL:EXT:ext_key/Resources/Private/Language/locallang.xlf:imageManipulation.mobile',
                         'allowedAspectRatios' => [
                             '4:3' => [
                                 'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.4_3',
                                 'value' => 4 / 3
                             ],
                             'NaN' => [
                                 'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.free',
                                 'value' => 0.0
                             ],
                         ],
                     ],
                     'desktop' => [
                         'title' => 'LLL:EXT:ext_key/Resources/Private/Language/locallang.xlf:imageManipulation.desktop',
                         'allowedAspectRatios' => [
                             '4:3' => [
                                 'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.4_3',
                                 'value' => 4 / 3
                             ],
                             'NaN' => [
                                 'title' => 'LLL:EXT:lang/Resources/Private/Language/locallang_wizards.xlf:imwizard.ratio.free',
                                 'value' => 0.0
                             ],
                         ],
                     ],
                 ]
            ]

To Render Crop varient I am using following code

`<f:image image="{data.image}" cropVariant="mobile" width="800" />`

Following error, I am getting while doing Image test

Image generation failed ImageMagick / GraphicsMagick handling is enabled, but the execute command returned an error. Please check your settings, especially ['GFX']['processor_path'] and ['GFX']['processor_path_lzw'] and ensure Ghostscript is installed on your server.

3

There are 3 best solutions below

0
On

-bash: /usr/bin/convert: No such file or directory can result from different errors:

1st:
there really is no executable.
Make sure IM or GM is installed and provide the correct path in the TYPO3 configuration.
Maybe only the path is wrong.

2nd:
the executable is there, but the web-user (apache-user) has no access to the executables.
Make sure the user has access like chmod +x /usr/bin/convert

1
On

@Shabnam: if you didn't solve this issue yet: I had the same problem and after some debugging found out it is the setting -auto-orient that was added in Typo3 9 as parameter to 'convert', that was causing the problem.

If you remove this setting in the following files, your image tests will probably succeed:

typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php (change to public $scalecmd = '-geometry';)
typo3/sysext/core/Classes/Utility/CommandUtility.php (remove $parameters = '-auto-orient ' . $parameters;)
0
On

I also came across this question. None of the above things worked for me. Running the same command as the TYPO3 install tool on console showed an error message:

convert: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408.

In the end this worked for me: ImageMagick security policy 'PDF' blocking conversion