Error uploading image in WordPress means WordPress could not receive, move, process or register the file. The cause is rarely the image itself: it is usually wrong permissions on wp-content/uploads, PHP upload or memory limits, a plugin conflict, a broken upload path, or an image the server cannot process. Test with a small, simply named JPG first, then check the uploads folder, PHP limits and the error log.
Quick checks
- Upload a small JPG renamed to plain characters, such as
test-image-01.jpg: if it works, the original file is the problem. - Read the exact message: “could not be moved to wp-content/uploads” points to permissions, “Post-processing of the image failed” to memory or image libraries, “file type is not permitted” to MIME rules, and a bare “HTTP error” to limits, plugins or the browser.
- Open Media → Add New: the “Maximum upload file size” shown there is your current server limit.
- Check Tools → Site Health → Info → Directories and Sizes and Filesystem Permissions to see whether the uploads directory is writable.
- Try another browser or a private window to rule out extensions and stale cache.
What Is the “Error Uploading Image” Problem in WordPress?
Error uploading image in WordPress is a broad media upload failure. It appears when WordPress cannot complete one or more parts of the upload process: receiving the file from the browser, saving it to the uploads directory, creating attachment data, generating image sizes such as thumbnails, and registering the file in the Media Library.
If any of those steps fail, WordPress may show a vague message such as:
- The uploaded file could not be moved to wp-content/uploads
- Post-processing of the image failed
- Sorry, this file type is not permitted for security reasons
- HTTP error
- Error uploading image
The wording varies. The real causes usually do not.
Causes and fixes
1. Wrong permissions or ownership on the uploads folder
How to check: Run ls -ld wp-content/uploads wp-content/uploads/$(date +%Y) from the WordPress root and ps aux | grep -E "php-fpm|lsphp|apache|nginx" | head to see which user PHP runs as. If the folders belong to another user (often root after a migration or restore) or are not writable, or the message says “could not be moved to wp-content/uploads”, this is your cause.
How to fix: Restore standard permissions and the correct owner (replace www-data with your PHP user, or your account user on cPanel/hPanel):
sudo chown -R www-data:www-data wp-content/uploads
find wp-content/uploads -type d -exec chmod 755 {} \;
find wp-content/uploads -type f -exec chmod 644 {} \;On shared hosting, use the File Manager’s “Fix permissions” tool or set folders to 755 and files to 644. Avoid 777.
2. PHP upload and post size limits are too small
How to check: Larger images fail while small ones work, usually with a generic “HTTP error”. Compare the limit under Media → Add New with the file size, or run php -i | grep -E "upload_max_filesize|post_max_size|max_execution_time|max_input_time" (the web PHP version can differ from CLI, so Site Health → Info → Server is more reliable). On NGINX, a 413 Request Entity Too Large in the browser’s network tab means client_max_body_size is the limit.
How to fix: Raise the limits in your hosting panel’s PHP settings, or in php.ini / .user.ini:
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_time = 300Keep post_max_size at least as large as upload_max_filesize. On NGINX, add client_max_body_size 64M; to the server block and run sudo nginx -t && sudo systemctl reload nginx. Restart PHP-FPM or LiteSpeed so new PHP values take effect. If the browser shows a 413 Request Entity Too Large page instead of an HTTP error, a web server or CDN limit is lower than PHP’s and has to be raised first.
3. PHP memory runs out while processing the image
How to check: The upload reaches 100% and then fails with “Post-processing of the image failed”, typically on large or very high-resolution photos. The PHP error log or wp-content/debug.log shows Allowed memory size of ... bytes exhausted.
How to fix: Raise the memory limit in wp-config.php above the “That’s all, stop editing” line:
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );WordPress cannot exceed the server’s PHP memory_limit, so raise that in the hosting panel too if needed. Resizing very large photos (for example to 2500 px wide) before upload also avoids the problem.
4. The file type is not allowed
How to check: WordPress shows “Sorry, this file type is not permitted for security reasons”. Run file image.jpg on your computer: if it reports a different format than the extension (for example a WebP or HEIC saved as .jpg), or the file is an SVG on a default WordPress install, this is the cause.
How to fix: Re-export the image as a real JPG, PNG or WebP with a matching extension. For SVG, use a dedicated plugin that sanitizes SVG files rather than allowing ALLOW_UNFILTERED_UPLOADS, which disables an important security check.
5. The image is corrupt or the server cannot process it
How to check: Only one file fails while others upload fine, or every image uploads but thumbnails are missing. Check Tools → Site Health → Info → Media Handling: it shows the active image editor (Imagick or GD) and supported formats. An empty or missing editor means the PHP image extension is not installed.
How to fix: Open and re-save the image in an editor, convert it to JPG or PNG, and strip metadata. If no image editor is listed, install one, for example sudo apt install php-imagick or php-gd for your PHP version, then restart PHP-FPM. On shared hosting, enable imagick or gd in the PHP extensions settings.
6. A plugin or theme interferes with uploads
How to check: The error started after a plugin or theme update, or only uploads through one form or plugin fail while the Media Library works. Run wp plugin list --status=active and look for image optimization, WebP conversion, security, lazy-load, media offload or CDN plugins.
How to fix: Deactivate those plugins and retest, then re-enable them one at a time until the error returns (wp plugin deactivate plugin-slug works if wp-admin is unusable). Also switch temporarily to a default theme such as Twenty Twenty-Four to rule out custom media code in functions.php.
7. The upload path or folder structure is wrong
How to check: Run wp option get upload_path and wp option get upload_url_path. Both should normally be empty. An old absolute path from a previous server, or a missing year/month folder under wp-content/uploads, means WordPress is trying to save files to a location that does not exist. A UPLOADS constant in wp-config.php can cause the same problem.
How to fix: Clear the custom paths with wp option update upload_path "" and wp option update upload_url_path "", remove or correct any UPLOADS define, and make sure WordPress can create wp-content/uploads/YYYY/MM (create it manually with the permissions from cause 1 if needed).
8. Browser or network problems
How to check: Uploads fail with a generic HTTP error only in one browser, on one network, or intermittently on large files. A private window or another browser uploads the same file successfully.
How to fix: Disable extensions that modify requests (ad blockers, privacy and security extensions), clear the site’s cache and cookies, pause antivirus web scanning, and retry on a stable connection. If uploads time out on slow connections, the raised max_execution_time and max_input_time from cause 2 also help.
General troubleshooting
- Turn on the debug log briefly. Add
define( 'WP_DEBUG', true );,define( 'WP_DEBUG_LOG', true );anddefine( 'WP_DEBUG_DISPLAY', false );towp-config.php, reproduce the upload, readwp-content/debug.log, then turn debugging off again. - Read the server logs. Check the PHP error log and the web server error log (for example
/var/log/nginx/error.logor the hosting panel’s error log) for permission denied, memory or file move errors. - Compare upload routes. If the Media Library works but a front-end form fails, the plugin behind that form is the suspect; if everything fails, focus on permissions, limits and paths.
- Review recent changes. Plugin or theme updates, a hosting migration, a PHP version change, security hardening or a new CDN/offload setup right before the error usually point to the cause.
Prevention Tips
- Keep image files reasonably sized before upload.
- Use standard file names with simple characters.
- Keep WordPress, plugins, and themes updated, but update carefully.
- Avoid installing multiple media-related plugins that overlap.
- Monitor file permissions after migrations and restores.
- Use realistic PHP memory and upload limits for your site.
- Test media uploads after major server or PHP changes.
- Remove abandoned image optimization or offload plugins.
When to Contact Support
Contact your hosting provider if:
- the uploads folder is not writable,
- permissions keep resetting,
- PHP limits cannot be changed from your side,
- server logs show permission, memory, or module issues.
Contact the plugin or theme developer if:
- the problem started right after their update,
- uploads fail only when that plugin or theme is active,
- the error appears only in one custom upload flow.
Focus on WordPress-level troubleshooting if:
- simple files fail in the normal Media Library,
- the uploads folder is missing or misconfigured,
- you recently migrated the site or changed PHP settings.
FAQ
Why does WordPress say error uploading image?
Usually because WordPress cannot save, move, or process the file correctly. The most common causes are bad permissions, low memory, upload limits, plugin conflicts, and wrong upload paths.
How do I fix WordPress image upload HTTP error?
Start by trying another browser, reducing the image size, disabling media-related plugins, checking the uploads folder, and reviewing memory and upload limits. Generic HTTP upload errors often come from browser conflicts, permissions, or PHP limits.
Where is the uploads folder in WordPress?
Normally it is located at /wp-content/uploads/. WordPress needs that folder to exist and be writable in order to save uploaded images.
Can a plugin cause image upload errors in WordPress?
Yes. Image optimization, security, media offload, CDN, and custom admin plugins can all interfere with uploads or image processing.
Why does only one image fail to upload in WordPress?
Usually because that file is too large, corrupt, oddly named, unsupported, or difficult for the server to process. Re-exporting or resizing the image often fixes that case.
Related WordPress Errors
- 403 Forbidden WordPress
- Failed to Open Stream WordPress
- WordPress REST API Error
- WordPress Stuck in Maintenance Mode
Hi, I’m Alex — the person behind ErrorRescue.
I’ve been working with websites, servers, and hosting for over 8 years. Most of my experience comes from troubleshooting real problems on WordPress sites, VPS and shared hosting environments, and Cloudflare setups. I’ve dealt with everything from SSL certificate failures and DNS misconfigurations to 504 timeouts, memory exhaustion errors, and Cloudflare 5xx issues.
I started ErrorRescue because I got tired of seeing generic, outdated, or incomplete error guides. My goal is to write clear, practical fixes based on what actually works in production — not just theory. Every guide here is tested against common server setups (Apache, NGINX, Cloudflare, and popular WordPress stacks).
When I’m not fixing sites, I’m usually reviewing new hosting configurations or updating existing guides so they stay accurate.