Support » Alpha/Beta/RC » Fatal Error with ImageMagick and Media Editor

  • Resolved Ed Gray


    I get an error when uploading images, but see thumbnail. However, if I attempt to edit the image U get the following error message:

    Fatal error: Non-static method Imagick::queryformats() cannot be called statically in /nas/wp/www/staging/myusername/wp-includes/class-wp-image-editor-imagick.php on line 98

    This happens with newly uploaded images as well as with images uploaded previously in 3.4.

    When I go to insert a newly uploaded image there is no option to select other sizes, it appears I only have one size of the image. With images uploaded with 3.4 I have three sizes to choose from.

    If I attempt to regenerate the thumbnails I get the following error:
    function (){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this}

    I’m running ImageMagick 6.5.7-8 2012-04-30 Q16 on

Viewing 11 replies - 1 through 11 (of 11 total)
  • Mike Schroder


    WP 4.5 Release Lead

    What version are you running?

    That happens because the version of the Imagick module isn’t new enough, but the fatal error it causes should have been fixed as of two weeks ago: [22581].

    If you haven’t updated recently, please try updating to RC1, or the most recent nightly/trunk, and let me know if you’re still seeing the issue.

    Mike Schroder


    WP 4.5 Release Lead

    Sorry, I see you’re running 3.5-1-22879 per your post’s info.
    As of that revision, the patch above certainly should have fixed this.

    Checking into how it might not be defaulting to GD like it should be.
    What version of Imagick does phpinfo() say you are running?

    phpinfo says I’m running ImageMagick 6.5.7-8 2012-04-30 Q16

    If it helps it also says that I am running ImageMagick module version 2.1.1-rc1

    FWIW, it’s working for me.

    Tested on Version 3.5-RC1-22893 with ImageMagick 6.7.0-10 2012-11-16 Q16 and module 3.0.1 – So newer version is fine still.

    Mike Schroder


    WP 4.5 Release Lead

    Looks like, indeed, there was a bug with how WordPress was detecting whether Imagick was supported.

    Imagick 2.2.0 or greater is necessary for it to work properly with our implementation.

    This patch should solve the fatal error for you, and make WordPress default to GD.

    I’ll ping back to the thread again when it’s in core.

    Mike Schroder


    WP 4.5 Release Lead

    A fix should be in core now. Would you mind updating to see if it resolves the issue?

    Yes, your patch resolved the problem. Images uploaded successfully, multiple sizes are available and I can edit images without any errors.

    On a separate note I have opened a support ticket with WPEngine, my web host, to upgrade the version of ImageMagick they have installed on their servers to at least 2.2.0, but hopefully the latest stable module release which is 3.0.1.


    Mike Schroder


    WP 4.5 Release Lead

    Glad to hear it! No problem!

    Thanks muchly for your report, and confirming that it fixed the bug for you.

    If you run into further issues, please let me know!

    Hi there
    I’ve just stumbled across this topic when searching for help with the same issue.

    When uploading images I often get an error message ending in ‘class-wp-image-editor-imagick.php on line 320’

    Sometimes but not always!

    My website is pretty new and it says all updates are good and up to date. I’m running wordpress 3.5.1 and a graph paper press theme called Albedo.

    @fivelightsdown – this thread is already marked resolved – so it’s not a good place to get help – please see:

    and start a new thread here:

    How-To and Troubleshooting

    Thanks! New to all this stuff…

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Fatal Error with ImageMagick and Media Editor’ is closed to new replies.