ImageMagick [Unable to execute command]

The thumbnailer on my site is no longer displaying thumbnails. I’ve tried disabling all modules to check for compatibility but to no avail. All existing items are alright but any new media (pdfs, pngs, etc) I upload to items no longer generate their thumbnails on the admin or the public side. I’m logging error messages and these seem to be the most relevant:

Command "/bin//convert --version" failed with status code 1.
convert convert: Request did not return an image.

Here is my system info, I am on Reclaim Hosting (shared server)

PHP
Version	8.0.30
SAPI	cgi-fcgi
Memory Limit	128M
POST Size Limit	150M
File Upload Limit	150M
Garbage Collection	Yes
Extensions	bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dba, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, iconv, imagick, imap, intl, json, ldap, libxml, mbstring, monarxprotect, mysqli, mysqlnd, odbc, openssl, pcntl, pcre, PDO, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, readline, Reflection, session, shmop, SimpleXML, snmp, soap, sockets, sodium, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, zlib
MySQL
Server Version	8.0.35
Client Version	mysqlnd 8.0.30
Mode	ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_ENGINE_SUBSTITUTION
OS
Version	Linux 5.4.0 x86_64
Modules
active	Advanced Search (3.4.13), Analytics Snippet (3.4.4), Blocks Disposition (3.4.2.3-beta), Bulk Edit (3.4.21), Bulk Export (3.4.28), CSSEditor (1.3.1), CSV Import (2.5.0), Collecting (1.11.1), Custom Vocab (2.0.2), Easy Admin (3.4.14), Fields as Tags (1.1.0), File Sideload (1.7.1), Generic module (3.4.45), IIIF Server (3.6.14), Image Server (3.6.14), Log (3.4.19), Mapping (1.10.0), Metadata Browse (1.6.0), Next (3.4.47), OAI-PMH Repository (3.4.7), Page Blocks (1.3), Value Suggest (1.16.1), Zotero Import (1.3.0)
not_active	PDF Embed (1.2.1), Pdf Viewer (3.4.4), Rights Statements (1.2.1), Simple PDF (1.0.1), Universal Viewer (3.6.7)
Paths
PHP CLI path	/usr/local/bin/ea-php81
ImageMagick directory	/bin/
Get PHP CLI version
PHP 8.1.24 (cli) (built: Oct  2 2023 00:00:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.24, Copyright (c) Zend Technologies
Get ImageMagick version
[Unable to execute command]

My local.config file has not been changed (although I did try to change to imagick and gd, but neither of those fixed the issue either).

       'thumbnailer_options' => [
            'imagemagick_dir' => null,
        ],
    ],
    'translator' => [
        'locale' => 'en_US',
    ],
    'service_manager' => [
        'aliases' => [
            'Omeka\File\Store' => 'Omeka\File\Store\Local',
            'Omeka\File\Thumbnailer' => 'Omeka\File\Thumbnailer\ImageMagick',
        ],

Here is a public view of a new item with recently media that is not generating thumbnails/previews https://whatcomdigitalcommons.org/s/home/item/2211

Any insight on what I can do to resolve this issue?

It looks like your server might be using the package “GraphicsMagick” instead of ImageMagick at /bin/convert? GraphicsMagick has various differences, including apparently in how it responds to the --version command we issue to check it. If ImageMagick is available at some path, changing the configured path to point to it should resolve your issue. Checking with your host is probably your best move.

Hey, Reclaim’s SysAdmin here. We’ve reached out to cPanel on this issue and, currently, we’re unable to switch from GraphicsMagick to ImageMagick on new servers running Ubuntu and cPanel. They suggested putting in a feature request for this, which we plan to do, but wanted to check here prior if there was any intention for Omeka/Omeka S to support GraphicsMagick.

We could probably change the version check slightly so it would work between the two, but then there’d be problems doing the actual thumbnails, as GraphicsMagick doesn’t support all the same options as ImageMagick does.

In that case, we’ll go the feature request route for cPanel and see if they have this planned, and what our other options are. Thank you!

@reclaimchris any updates on this ?

They have done some updates so that now .tiff, .jpg, .png and maybe other image files (I only tested those three) now auto-generate their thumbnails. The current instructions to update ImageMagick are here. Unfortunately PDF thumbnails still aren’t being created. @sunyue also posted about this ongoing problem over here.

Considering PDFs constitute the most common file uploaded to our repository this has been causing some workflow issues. I remain optimistic that Reclaim Hosting is working on a solution for this.

1 Like