Web : ImagickException: attempt to perform an operation not allowed by the security policy `PDF’

By | September 21, 2020

After updating ImageMagick to version 6.9.10.23+ from an earlier version, the following behavior occur :

  • Thumbnails generation from PDF, XPS, PS, and EPS does not work anymore
  • The following output can be found in the Web server error log :

This is due to the addition of a policy in the newer version that disable ghostscript formats.

1. Edit the ImageMagick policy file :

2. Locate the following lines (usually at the very bottom of the file, around lines 89 to 95) :

3. Comment or remove those entries and restart the Web server service.