Post-Processing of the Image Failed Likely Because the Server is Busy: Solved
Occasionally, you might see the following error when uploading an image to the Media Library. The issue can also occur when uploading an image in a Gutenberg block, or page builder image widget or image area, etc.:
Sometimes, you encounter the following error while uploading an image to the Media Library. The issue can also occur when uploading an image in a Gutenberg block, or page builder image widget, an image area, and so on.
Post-processing of the image failed likely because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggest maximum size is 2500 pixels.
It turns out that when you get this error it’s because your PHP settings have maxed out.
Here are the step-by-step instructions on how to use cPanel, the interface that comes with your hosting package, to fix the error.
-
- Use GD Library instead of ImageMagick for image processing. Add the following to your WordPress theme’s function.php file.
add_filter('wp_image_editors', function($editors) {
return ['WP_Image_Editor_GD', 'WP_Image_Editor_Imagick'];
}) - Verify your upload limit. The web server typically has each account set to a maximum file upload size, such as 10MB-128MB. Is the maximum file upload size set to something small, possibly in the vicinity of your large image’s size, e.g. 1-2MB? Generally, you will need to ask your host about this setting. You can try to set this value in your php.ini or .htaccess file, but in most cases, any values set in those files will be overridden by the web server’s settings.
- Check your hosting account’s memory usage. If your account received high amounts of traffic or is involved (perhaps temporarily) in memory or CPU-intensive activities such as backups, etc., it may be legitimately running out of resources. In my experience, this is seldomly the cause but check.
- Swap your current PHP version. You may try to set the PHP version used on the site to a different version, for example, PHP 7.3 instead of versions 7.2, 7.4, or 8.0, etc. Be careful in doing so in case the PHP version change causes issues with the proper function of the site. Ideally, test this only if you have direct access to the PHP setting, or have extremely responsive technical support from your host (that is, don’t file a ticket for a potential site-breaking PHP version change if the average turnaround time on tickets is more than a few minutes or whatever you consider acceptable downtime.).
- Swap to a basic WordPress theme and retest the upload process. It’s probably best to move your site to a staging server first and test there unless you are not yet in production.
- Use GD Library instead of ImageMagick for image processing. Add the following to your WordPress theme’s function.php file.
Finally, before exiting the page, 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).