• I receive this error in Media Library when attempting to upload a photo over 2500 pixels wide (file size does not seem to matter): “Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels.” 2500 pixels seems small by today’s standards. During a chat session with HostGater, they indicated there were no errors in the server log file and suggested it was user error (not in so many words). This does sound like a server issue to me. Eventually the photos do seem to process but it takes a very long time and I have a difficult time building a page for this reason. Also, in the media library, the thumbs of the large photos do not show up. Can anyone help?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    The size limit WP imposes by default is 2560px square. It’ll accept larger images, but they will be scaled down to that size and the scaled size will be registered as the WP “Full” size. The original is retained on the server but not used by WP. This size is filterable through the ‘big_image_size_threshold’ filter, so themes and plugins can alter this up or down. We may argue if that’s a reasonable limit or not, but since we can alter it the argument is moot.

    That’s background info FYI. It’s unrelated to the post-processing failure. What has happened is the server’s image editor has taken too long to make scaled down versions of the image. This most commonly is due to overloaded servers. On shared hosting, the overload may have nothing to do with your account. You might try increasing the allowed time for PHP processing. I’m unsure if this impacts how long the image editor takes, but it’s easy enough to do and is worth a try. Add this to you wp-config.php file:
    @ini_set('max_execution_time', 60 ); //default 30
    Add it immediately above the MySQL settings comment line but below the initial comment block. Don’t be tempted to set the limit for too long, that can cause other problems. Ideally it should be just long enough but not much more.

    Thread Starter lotuspete

    (@lotuspete)

    Hi, `Thanks for your answer and explanation. Just so I’m clear, increasing the “allowed time for PHP processing,” is that done on WordPress or on cPanel for my host?

    As a follow up I spent quite a lot of time exploring this with HostGator and they basically said the reason for the failure was the same as what you said. I ended up upgrading my hosting package to a VPS as I just wanted to get this done conclusively. That is probably overkill and probably inserting the code as you suggested might’ve sufficed but I figured it was probably time to upgrade anyway.

    Moderator bcworkz

    (@bcworkz)

    There might be a cPanel setting, IDK. My proposal would only apply to WP requests. You’d be editing wp-config.php, one of the first files parsed on any WP request.

    Now that you have VPS (congratulations!), you could alter the setting directly in php.ini. But you likely no longer need the additional time anyway. And if you did, since it’s mainly due to WP image processing, it’d still make the most sense to only apply it to WP requests as I originally proposed.

    Log into your cPanel – most often it’s just at your site nname.com/cpanel
    (This will be the login information you received from your host to log into that account.)

    Scroll down to “Software” and click on “Select PHP Version.”

    From here all you need to do is set your memory_limit line to the max in the drop-down – in my case, this was 512M. It saves when you select it, so don’t worry about having to hit a “Save” or “Commit” button anywhere.

    Method 2 – Swap your PHP Extensions
    This one is probably going to require your hosting company to jump on board with some tech support, but if Method 1 didn’t help resolve the issue, this worked right away when I ran into this error again years later and was already maxed out on my PHP Memory Limit size.
    
    You need to ask your host to disable the gd PHP extension and enable the imagic extension.
    
    I’m still a little fuzzy as to why one’s better than the other, but it did fix it immediately.
    
    Wrapping Up
    Now before you close out this window, go to your WordPress post/page that you were working on, refresh the page, and try the image upload again.
    
    It should work now. If it doesn’t you may have to clear your cache (or try it in a Chrome Incognito window).
    
    If this helped you out I would appreciate a subscribe over on my YouTube Channel or a follow on Instagram. I also have a great email list with a bi-monthly newsletter that helps you keep your website afloat and your marketing moving forward.
    • This reply was modified 2 years, 11 months ago by jackfleming11.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post-processing of the image failed’ is closed to new replies.