WordPress Image Upload Error Post-Processing of the Image Failed

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.

Popular Problems

  • WordPress image upload error
  • WordPress app image upload failed
  • Big_image_size_threshold
  • WordPress images not loading
  • WordPress max upload size
  • disable big image threshold

This error might pop up in all of these different situations (and probably others, too):

  • Pasting pictures in the WordPress Block Editor (Gutenberg)
  • Uploading pictures to Media Library using the Image -block
  • Uploading pictures to Media Library from the Admin site

So most of the time, it’s something you run into when you’re uploading pictures into WordPress. So far, so good, right?

But the error is not accurate, and it won’t help you. It’s most likely NOT the server being too busy to serve you (it had one thing to do, right?), and uploading a smaller picture will usually not work at all. It’s much more likely a problem in the configuration.

Workaround

Before jumping into the actual steps to fix the issue, let’s really briefly address a workaround that might help a bit.

At least for yours truly, a workaround was to upload pictures one-by-one directly to the Media Library from the Admin site, and refresh the page using F5 every time between uploads.

It’s a crappy workaround, as it only worked about 50% of the time, but it kept the site going before I figured out the actual reason.

And now – let’s move on to the actual solutions!

Solution

There are quite a few possible reasons that might cause this issue to pop up. And hence, there are quite a few possible ways to fix it.

I’ll try and explain in a simple checklist the things you can change to try and fix this!

How to fix “Post-processing of the image failed likely because the server is busy or does not have enough resources.” when uploading pictures to WordPress Media Library?
  1. Try uploading your file using another browser

    A quick and easy to thing to start with – try uploading your file using another browser, or maybe just clear your cache to see whether that helps. Using the Incognito/Private browsing mode might also do the trick!

    As pointed out by Jason in the comments -section below, it’s sometimes this easy 🙂

  2. Rename your file

    Don’t use weird file names! Apostrophes, quotation marks, exclamation marks – stuff like that is risky. Try renaming your file to something that only has a-z and numbers, and see if it helps.

  3. Verify your upload limit

    Makes sense to check this next – just open your Media Library and navigate to “Upload Files”. Verify, that the “Maximum upload file size” is something meaningful – e.g., not “1 MB” or something.

    WordPress Image Upload Error Post-Processing of the Image Failed

    In case you DO have something ridiculously small here, you need to increase the limit to something borderline unreasonable like 128MB.

    There are multiple ways to change this. If you have access to php.ini file, you can configure it right there. If you don’t have access to it (maybe you’re on shared hosting?), you can also edit your .htaccess file to add something like this:

    # BEGIN Increase upload max filesize
    According to this:https://siberkalem.com/wordpress-image-upload-error-post-processing-of-the-image-failed
    php_value upload_max_filesize 128M
    php_value post_max_size 128M
    # END
  4. Verify your server resources

    Wait – what was the error message, again?

    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.

    Despite what the error says, the server resources running out is almost never the reason for the issue. However, it’s simple to verify, so next we’ll take a look at your web hosting plan!

    Navigate to cPanel (or whatever other server/account management software is available to you) and check out the “Statistics” section (or equivalent) to see if the memory usage is anywhere close to maximum.

    In case your server resources seem seriously underutilized, it might be a good idea to enable your WordPress installation to use a bit more of the resources. If you can edit your php.ini file, you can add this to the file:

    memory_limit = 512M

    You can also try and add this to .htaccess:

    # BEGIN Increase memory limit
    php_value memory_limit 512M
    # END

    Or this in your wp-config.php file:

    define( 'WP_MEMORY_LIMIT', '512M' );
  5. Select a supported PHP version

    I’ve read a lot of people complaining about this on PHP 7.3 or PHP 7.4. While it DOES in fact work for me with PHP 7.3, you could try and see if downgrading to PHP 7.2 helps you.

    At the very least this’ll help you narrow the issue down a bit!

  6. Enable required PHP modules

    Verify, that your PHP version has a module called “imagick” enabled.

  7. Enable required Apache modules

    I didn’t even have access to Apache modules in my case, so couldn’t verify – but I’ve seen a suggestion that a module called mod_fcgid needs to be enabled.

    Even that didn’t help? On to the more exotic solutions!

  8. Bypass GD Editor (whatever that even means)

    Some people report adding this to your functions.php helps:

    function use_gd_editor($array) {
    return array( 'WP_Image_Editor_GD', );
    }
    add_filter( 'wp_image_editors', 'use_gd_editor' );

    It didn’t help me, but I thought I’d include it for the odd chance it’d help someone else!

  9. Disable or bypass Cloudflare if you’re using it

    This might be useful just for narrowing the issue down. Clouflare will act as a proxy for your site, so while it might not break anything in itself, your WordPress installation might still misbehave. And Cloudflare might end up omitting the error messages you need to debug the issue!

    If everything works just fine without Cloudflare, then you know they’re messing with something in your installation.

  10. Disable SecFilterEngine and SecFilterScanPost using .htaccess

    Ah – this is a fun one! My issue (yes – I went through everything above, first) was resolved by disabling mod_security.

    This is a bit unfortunate – but for whatever reason, it seems like it’s messing with Cloudflare (at least with current WordPress version I’m running – 5.4.2). I suggest undoing this hack as soon as possible.

    Anyway – here’s what I had to add to my .htaccess file:

    
    # BEGIN a horrible hack to fix upload errors
    # See this: https://siberkalem.com/wordpress-image-upload-error-post-processing-of-the-image-failed
    SecFilterEngine Off
    SecFilterScanPOST Off
    # END a horrible hack

And that’s about it! That’s the article. Hope it helps – it’s helped me a few times already!

References

Leave a Comment