HTTP error medium
"HTTP error" Uploading Images to the Media Library
A vague "HTTP error" appears mid-upload in the Media Library, usually from PHP memory, the image processor, or a blocked request.
What you see
HTTP error. (shown as a red banner under the failed thumbnail in the Media uploader)
What’s actually happening
You drag an image into the Media Library, the progress bar crawls partway, then it dies with a red "HTTP error" and nothing else. The same file sometimes uploads on a retry, or a smaller image goes through fine. The message is generated client-side when the async request to async-upload.php fails or times out, so the real reason is in the server logs, not on screen.
Common causes
- PHP memory_limit too low for WordPress to generate the resized thumbnail set from a large image
- The image library (ImageMagick or GD) is missing, misconfigured, or chokes on the file's color profile/format
- The upload exceeds upload_max_filesize, post_max_size, or hits max_execution_time on a slow resize
- A security plugin or mod_security rule blocks the POST to async-upload.php (special characters in the filename trigger this often)
- A reverse proxy/CDN (Cloudflare) request size or timeout cap cuts the upload short
How to fix it
- Read the actual error before guessingOpen the browser Network tab, retry the upload, and click the failed async-upload.php request. A 500 points at PHP/memory, a 403 points at a security rule/WAF, a 503 or timeout points at the resize taking too long. Cross-reference the PHP error log (cPanel -> Errors or /var/log).
- Raise PHP memory and limitsSet WP_MEMORY_LIMIT to 256M in wp-config.php, and bump memory_limit, upload_max_filesize, post_max_size, and max_execution_time in php.ini or .user.ini. Thumbnail generation from a 5000px photo can need far more memory than the source file size suggests.
- Rule out the image processorInstall the Health Check plugin or check Tools -> Site Health -> Info -> Media Handling. If ImageMagick is flagged as broken, switch WordPress to GD by adding a filter that returns 'WP_Image_Editor_GD' first, then retry. A corrupt CMYK or oddly-profiled JPEG will fail in Imagick but convert fine in GD.
- Disable security plugins / mod_security to isolateTemporarily deactivate Wordfence/iThemes or have your host disable mod_security, then upload again. If it works, re-enable and whitelist async-upload.php instead of leaving protection off. Rename files with apostrophes, ampersands, or non-ASCII characters before upload.
- Re-save the image and shrink itExport the file as a clean sRGB JPEG/PNG under ~2MB and re-upload. Oversized originals and exotic formats are the single most common trigger; resizing before upload sidesteps the resize that was failing.
Stop it recurring
Keep PHP memory at 256M and pre-resize photos to web dimensions before uploading so the server never has to process a 20MB original.
Related errors