The red message appears in the Media Library or the editor, during or right after the upload bar finishes. It’s a generic message that hides the real reason, so look in two places: your browser’s developer tools and the server’s error log.
What the error means
WordPress uploads the image through a request to wp-admin/async-upload.php, then generates several thumbnail sizes from it. If the server answers with an error code (403, 413 or 500), or the response is cut off, WordPress shows the short HTTP error. message. Recent versions may instead say that post-processing of the image failed and suggest uploading a smaller one.
Common causes
- Out of memory while generating thumbnails: an image is decoded into roughly width × height × 4 bytes, so modern camera and phone photos need a lot of memory.
- Execution time exceeded when the theme registers many thumbnail sizes.
- File larger than allowed by
upload_max_filesizeorpost_max_size, so the request is rejected with a 413. - A firewall rule blocking the request with a 403.
- Expired session: you logged out in another tab, so the request was refused.
- Unusual file name or format, such as special characters in the name, or HEIC photos the server’s image library can’t handle.
How to fix it
- Try a small image: if it works, the problem is dimensions, memory or size. Reload the page, log in again and retry.
- Get the real status code: open developer tools (F12), go to the Network tab, upload the image and check the
async-upload.phprequest:- 403: a security rule; see ModSecurity 403.
- 413: the file is over the limit; see fixing upload_max_filesize.
- 500 or 503: a PHP or resource error; continue below.
- Read the error log in cPanel under Metrics › Errors and look for
Allowed memory sizeorMaximum execution time. - Resize before uploading: 2560 pixels wide is plenty for websites, and it’s the size WordPress scales big images down to anyway. Compress to JPEG or WebP as in the image optimization guide.
- Raise the memory limit: wp-admin and image processing use the
WP_MAX_MEMORY_LIMITconstant, so add it towp-config.php:
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
Also raise memory_limit under Software › Select PHP Version › Options or in MultiPHP INI Editor, since a low PHP value can stop WordPress from raising its own.
6. Switch from Imagick to GD if the log shows Imagick errors. Create wp-content/mu-plugins/use-gd.php:
<?php
add_filter( 'wp_image_editors', function () {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
} );
- Rename the file to Latin letters, digits and hyphens only, such as
product-photo-1.jpg, and convert HEIC photos to JPEG.
Prevention
- Set your camera or phone to a web-friendly resolution, or resize images before uploading.
- Only register the thumbnail sizes you actually use.
- Upload in small batches rather than dozens of photos at once.
On ArabyHost
You can set memory_limit and max_execution_time per site in cPanel and choose PHP 8.1, 8.2 or 8.3. Imunify360 protects sites from malicious requests; if you’re sure a 403 hit a legitimate upload, send support the time of the attempt and the page URL so they can check the rule. The Araby AI assistant reads the error log and tells you whether memory or time is the cause. See our WordPress hosting.
FAQ
Why do small images upload but large ones fail?
Memory use depends on pixel dimensions, not file size. A 6000 × 4000 photo can need around 96 MB of memory once decoded, before a single thumbnail is created.
Will another browser fix it?
Sometimes, if the cause is an expired session or a browser extension. If the same image fails in every browser, the problem is on the server and will show up in the error log.
Is the image saved despite the error?
The original may be saved in the Media Library without some thumbnails, because the error usually happens during processing after the upload. Delete it and upload again once fixed.