Issues with Thumbnail for PDFs after Upgrading to Omeka S v4.0.4

Hello everyone,

I recently upgraded my Omeka S site from version 3 to 4.0.4 and encountered an issue where thumbnails for uploaded PDF files are no longer being automatically generated. Prior to the upgrade, this feature worked seamlessly, presumably via Imagick.

Following path guidance from my hosting provider ReclaimHosting on configuring ImageMagick’s path, I encountered the following error:

ERR (3): convert: attempt to perform an operation not allowed by the security policy gs' @ error/delegate.c/ExternalDelegateCommand/387. convert: no images defined /tmp/omeka7wq6Ld.jpg’ @ error/convert.c/ConvertImageCommand/3362.
ERR (3): Command “/opt/rh-imagemagick/bin/convert -density 150 ‘/tmp/omeka8hglFa[0]’ -auto-orient -background white +repage -alpha remove -thumbnail ‘800x800>’ ‘/tmp/omeka7wq6Ld.jpg’” failed with status code 1.
ERR (3): [100%] Thumbnails creation failed for media 6012: unknown reason

Then I set the thumbnailer to Imagick in config/local.config.php, but then I received a very generic error message, despite having logging enabled: “Thumbnails creation failed for media 6012: unknown reason.”

My environment details are as follows:

  • Linux 5.4.0 x86_64
  • PHP 8.0.30
  • ImageMagick 7.1.1-28 (Beta) Q16-HDRI x86_64 0225ac41a:20240121
    I’m on a shared server and do not have root access or command line privileges.

Could anyone advise on where the problem might lie? Any help would be greatly appreciated.
Thank you in advance!

This is probably the issue: ImageMagick can have policies installed, and there’s a common policy that forbids processing PDF files.

You’d have to check with your host on this, and if they’re willing to change the policy or not.

Thank you for your response, John! I will reach out to Reclaim Hosting to try and resolve this issue. As a host for a large number of Omeka sites, I hope they can be flexible in this regard.
Wishing you a pleasant week ahead!