Thumbnail issue with Omeka-s 3.0.1 on Xampp 7.4.9

while Thumbnails with Imagick and gd library settings are working, we have run into a problem with path specfication of ImageMagick in the local.config.php file, both with a fully specified path
‘E:\xampp\htdocs\o-s-301\vendor\ImageMagick’ and a relative one ‘\ImageMagick’ (and actually everything we have thrown at it, using diff. directories etc.).

Thumbnailer\Imagick for example returns for the above path the followig error message:

Omeka\File\Exception\InvalidThumbnailerException: ImageMagick error: invalid ImageMagick command. in E:\xampp\htdocs\o-s-301\application\src\File\Thumbnailer\ImageMagick.php:112
Stack trace:
#0 E:\xampp\htdocs\o-s-301\application\src\File\Thumbnailer\ImageMagick.php(41): Omeka\File\Thumbnailer\ImageMagick->setConvertPath(’\ImageMagick’)

I am sure we are doing something wrong here…

You’re not using the “Imagick” thumbnailer. If you have the Imagick extension available, it’s probably a good idea to use it, since it doesn’t require you to set paths like this. You’re using the regular “ImageMagick” thumbnailer that runs the command-line version of ImageMagick to make the thumbnails.

Switching to Imagick would resolve this issue, but as for the ImageMagick thumbnailer, do you get the exact same error when using the “absolute” path? The relative one you’ve listed the error output for definitely won’t work.

Correct, yes, we had been using php imagick, but because of unresolved issues with the Universal Viewer that may or may not have been related, we switched first to ‘gd’ (which was working, …though not the viewer) and then tried the last remaining thumbnailer option.

for the full path
‘thumbnailer_options’ => [
‘imagemagick_dir’ => ‘E:\xampp\htdocs\o-s-301\vendor\ImageMagick’,
],

the error looks very similar:

Omeka\File\Exception\InvalidThumbnailerException: ImageMagick error: invalid ImageMagick command. in E:\xampp\htdocs\o-s-301\application\src\File\Thumbnailer\ImageMagick.php:112
Stack trace:
#0 E:\xampp\htdocs\o-s-301\application\src\File\Thumbnailer\ImageMagick.php(41): Omeka\File\Thumbnailer\ImageMagick->setConvertPath(‘E:\xampp\htdocs…’)

Is that really where you have ImageMagick installed? It’s very odd to have it within the Omeka S “vendor” directory, or for that matter anywhere within the Omeka S installation itself.

Anyway, it seems somewhat likely to me that this detection may just never work on Windows: we’re looking for the file “convert” and on Windows it will be called “convert.exe” instead.

Yes, in the end we packed it into the vendor folder (it was first on E:), because in local.config.php the assignment of ‘logger’=>[‘priority’=>\Laminas…etc. was something that was obviously working.

I should add, that we are a group of artist, with limited coding experience…

Re. the convert.exe issue, could there be a workaround?

To see if that’s the actual problem, you can try just editing the file: application/src/File/Thumbnailer/ImageMagick.php. There’s a line that specifies the “CONVERT_COMMAND” and you can change it from “convert” to “convert.exe”

You may have other problems going on as well (like, the ImageMagick commands may not function correctly or at all if moved around from their normal locations).

Also, Imagick shouldn’t really be a problem to use either. I’m not sure of the details of the issue you were having with the Universal Viewer module, though.

…ok we just changed ‘convert’ to ‘convert.exe’, but the error still occurs…

Omeka\File\Exception\InvalidThumbnailerException: ImageMagick error: invalid ImageMagick command. in E:\xampp\htdocs\o-s-301\application\src\File\Thumbnailer\ImageMagick.php:114
Stack trace:
#0 E:\xampp\htdocs\o-s-301\application\src\File\Thumbnailer\ImageMagick.php(43): Omeka\File\Thumbnailer\ImageMagick->setConvertPath(‘E:\xampp\htdocs…’)

There is however the gd library to fall back on for now, so this isn’t a show stopper. If by chance we come across a way to make it work, we’ll post it here. Many Thanks, Fred