Home » wp-content » The Server Cannot Process the Image: WordPress Upload Fix

The Server Cannot Process the Image: WordPress Upload Fix

You drag a photo into the Media Library, the progress bar fills up, and then WordPress shows this:

The server cannot process the image. This can happen if the server is busy or does not have enough resources to complete the task. Uploading a smaller image may help. Suggested maximum size is 2560 pixels.

On older WordPress versions the same error read “Post-processing of the image failed. If this is a photo or a large image, please scale it down to 2500 pixels and upload it again.” Both come from the same http_error_image string in core, and the cause is the same.

The file itself usually uploads fine. What fails is the step after it, when PHP opens the image and builds every thumbnail size your theme and plugins registered. That step needs memory and time, and on shared hosting or a small VPS those are often the first things to run out.


Reload the Media Library before you upload again. Often the attachment is already there, just missing some of its smaller sizes, and a second upload only gives you a duplicate.

If it is there, you can fill in the missing sizes later with WP-CLI (Step 5). If it is not, start with Step 1.

The 2560 pixels in the message is not random. It is the default value of the big_image_size_threshold filter, the size WordPress scales big uploads down to.

A 6000 x 4000 photo straight from a phone or camera has to be decoded in memory before WordPress can resize it. Export it at 2560 pixels on the long side (or smaller) and the error is usually gone. That works for a one-off upload. If your editors upload camera photos every day, fix the server side below.

WordPress raises the PHP memory limit on its own before it edits images. The image_memory_limit filter defaults to WP_MAX_MEMORY_LIMIT or the original php.ini memory_limit, whichever is higher.

So the constant that matters here is WP_MAX_MEMORY_LIMIT, not WP_MEMORY_LIMIT. Back up wp-config.php, then add this above the /* That's all, stop editing! */ line:

define( 'WP_MAX_MEMORY_LIMIT', '512M' );
server cannot process the image wp config 1 - The Server Cannot Process the Image: WordPress Upload Fix
Where it goes in wp-config.php: above the “That’s all, stop editing!” line

Upload the image again. If nothing changes, your host probably does not let PHP raise its own limit, and you need to change memory_limit in php.ini or the hosting panel instead. I explain the difference between the two constants in WP_MEMORY_LIMIT vs WP_MAX_MEMORY_LIMIT.

💡 A value in wp-config.php can never go above a hard limit set by the host, such as a PHP-FPM pool setting or a container memory cap. If 512M changes nothing, ask the host what the real ceiling is.

WordPress tries two image libraries, in this order: WP_Image_Editor_Imagick, then WP_Image_Editor_GD. You can see that default in the wp_image_editors filter.

Imagick gives better quality, but on a busy server it is also the editor I would suspect first. To test it, tell WordPress to use GD only. Put this in a small plugin in wp-content/mu-plugins/ (or in your child theme’s functions.php):

<?php
// Use GD instead of Imagick for image uploads.
add_filter( 'wp_image_editors', function ( $editors ) {
    return array( 'WP_Image_Editor_GD' );
} );

If uploads work after that, you found the problem. You can keep GD, or ask the host to look at the ImageMagick setup and its resource limits.

Before you rely on GD, check which extensions PHP actually has. Run this from the site folder:

wp eval 'var_dump( extension_loaded( "imagick" ), extension_loaded( "gd" ) );'

You get two booleans, Imagick first. If GD is false, do not use the filter above, because WordPress would have no image editor left at all.

See also  SSL Is Required, but the Server Does Not Support It: WP-CLI Fix

One big image times several thumbnail sizes can take longer than a low max_execution_time allows, especially on a slow CPU. If memory was not the issue, raise these in php.ini or your hosting panel:

memory_limit = 256M
max_execution_time = 120

Restart PHP (or let the panel apply it) and try the upload again.

In OpenPanel you change both under PHP > Options: pick the PHP version, edit the values and save. They go into that version’s php.ini and apply to every domain using that version, so it is closer to editing php.ini per version than to cPanel’s per-domain MultiPHP INI Editor. OpenPanel also has PHP > Extensions, where you can turn imagick on or off per PHP version if you want to test Step 3 at the server level.


Images that “failed” earlier are often in the library with only some sizes created. Once the server side is fixed, let WP-CLI fill the gaps instead of uploading again. Back up wp-content/uploads first if you have never run this on the site.

wp media regenerate --only-missing --yes

--only-missing builds only the sizes that do not exist yet, so it is much faster than a full regenerate and leaves existing files alone. You can also pass a single attachment ID, which is handy for testing:

wp media regenerate 1234 --only-missing

Replace 1234 with the attachment ID (you see it in the URL when you open the image in the Media Library). If the command fails on the same file, the problem is still the server, not the browser, and the PHP error log will say why. All options are in the wp media regenerate docs.

The uploader message is generic. The actual reason is in the PHP or web server error log, usually as an “Allowed memory size exhausted” fatal error or a timeout.

If you cannot reach the server logs, turn on WP_DEBUG_LOG, upload the image once, and read wp-content/debug.log. I go through that setup in How to properly DEBUG in WordPress.

What to look for in the log:

  • Memory exhausted inside class-wp-image-editor-imagick.php or class-wp-image-editor-gd.php: go back to Step 2.
  • Maximum execution time exceeded: Step 4.
  • Nothing at all: the request may be cut off before PHP can log anything, for example by a proxy timeout or a security rule. Check the web server log and any WAF in front of the site.

💡 If the upload fails with a different message, like a file type error or a missing temporary folder, it is a different problem. See Not Allowed to Upload This File Type and Missing a temporary folder.

Every image size registered by your theme and plugins is one more resize per upload. Run wp media image-size to list them. If you see sizes from plugins you no longer use, removing those plugins makes every future upload cheaper.

Do not disable big_image_size_threshold just because a forum reply suggested it. It does nothing for the memory needed to process the original, and it means the huge original is used as the main image on the front end.


TL;DR: “The server cannot process the image” means PHP ran out of memory or time while creating thumbnails. Check if the image is already in the library, add WP_MAX_MEMORY_LIMIT to wp-config.php, try GD instead of Imagick with the wp_image_editors filter, raise max_execution_time, then run wp media regenerate --only-missing for the sizes that failed. As of 2026-11-28 this is the wording in current WordPress; older sites show “Post-processing of the image failed” for the same problem.

Was this post helpful?

Leave a Comment

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.

Recommended