The frustrating WordPress image upload error can usually be resolved fairly quickly, especially if it’s due to a minor glitch. We’ve gone through it, and that’s why we’ve covered these simple tips that will help you troubleshoot easily, with a high likelihood of solving the issue right away. They are easy to follow every time you get this issue. However, if it’s some complex issue, we’ve covered an advanced step to resolve it, too.
1- Check Issues With Your Image File
The most common culprit of image uploading in WordPress can be your image file issues.
If your image’s extension is .tiff, .svg .raw, or .bmp, then it’ll very likely cause an error because WordPress does not support these file extensions. Don’t worry. You can convert your image through online image converters.
Convertio is an online tool where you can convert your images to any format.
Upload your image and select the following WordPress-supported image file extensions:
Jpeg
WEBP
PNG
GIF
We recommend uploading WEBP images because they’re lighter and faster and help your website page load faster compared to PNG and JPEG.
Don’t use special characters in your image file name
Filenames containing special characters like #, $, !, ~, *, or spaces can cause issues during the upload process. Some servers are configured to disallow filenames with special characters, leading to upload errors or inaccessible files, or its WordPress, which can reject your image with those special characters.
WordPress recommends using simple filenames with letters, numbers, and dashes to prevent such problems.
2- Reupload The Image From The Media Library
Sometimes, there can be issues with catching file permissions or even database-corrupted data.
Uploading the image again can create a new entry in the WordPress database, which may resolve issues stemming from corrupted database entries associated with the original upload.
Go to your WordPress dashboard and click on “Media”:
Now try reuploading your image from here.
Reupload the image through “browser uploader”
Using the “Browser Uploader” in WordPress can potentially fix image upload issues by offering a simpler, more direct upload method.
It bypasses potential conflicts with plugins, avoids advanced dependencies like JavaScript, and works with older browsers. To use it:
Go to Media > Add New Media File in the dashboard.
Click the “browser uploader” link below the main upload area.
Select your file and upload it.
This method is great for troubleshooting when the default uploader fails.
3- Clear Your WordPress Cache
Clearing your WordPress cache fixes image upload issues by removing outdated or corrupted data that may block new uploads.
Clear it via your caching plugin like WP Rocket. If you don’t have WP Rocket, LiteSpeed Cache is a free plugin that can help you easily clear your cache.
Using the LiteSpeed cache plugin to clear the cache
Access Your WordPress Dashboard: Log in to your WordPress admin area.
Purge Cache: Click the “Purge All” button in the Toolbox section to clear all cached content.
Using the WP Rocket plugin to clear the cache
Access Your WordPress Dashboard: Log in to your WordPress admin area.
Go to WP Rocket Settings: In the left-hand menu, go to Settings > WP Rocket.
Clear Cache: On the Dashboard tab, locate the Quick Actions section and click the “CLEAR CACHE” button.
4- PHP Memory Limit Issue
If you’re getting the error The server cannot process the image then it’s most likely the problem because of the PHP memory limit. The maximum amount of memory a PHP script can use is set too low to handle the image’s processing requirements.
Increasing the PHP memory limit can resolve WordPress image upload issues by allocating more server resources for processing large images.
How to increase PHP memory limit via wp-config.php:
Access your WordPress files:
Use your hosting provider’s file manager (e.g., Hostinger, Bluehost) to go to your WordPress installation directory.
If your hosting provider doesn’t provide a file manager, you’ll need to set up an FTP client like Filezilla to access your WordPress files directly.
Find the “wp-config.php” file in the root directory of your WordPress installation.
If you are using the hosting provider file manager, you will find the “Edit” option to directly edit the file.
If you’re using an FTP client, then you may have to download the file by right-clicking and clicking “Download” to save it to your local computer, edit the file locally and re-upload it.
Add the following line in the “wp-config.php” file
Add this line just below the line that says:
/* That’s all, stop editing! Happy publishing.*/
define( ‘WP_MEMORY_LIMIT’, ‘256M’ );
Save the changes to the file.
Save and upload the file:
Save the changes, upload the modified “wp-config.php” file back to your server and overwrite the existing file. If you are directly editing the file from the server, you can just save the changes.
Try reuploading the image again:
Increasing the PHP memory limit allows WordPress to handle larger images and potentially resolve upload issues.
Log in to your WordPress dashboard and try to upload an image to see if the issue is resolved.
Contact Your Hosting Provider
Lastly, if you are still facing WordPress image upload issues after following all the steps, then you must contact your hosting provider.
They can adjust server settings, such as increasing PHP memory limits, Incorrect file permissions on your server, or modifying file upload size restrictions, or if your server lacks sufficient resources to handle image uploads, your hosting provider can help you upgrade your hosting plan to meet your site’s needs.
Let The Professionals Fix The Issue For You
Image upload issues are just one of the WordPress issues you’ll face. There can be hundreds of WordPress emergency issues that could temporarily stop your site, and that’s when you need USDigitarget’s 24/7 WordPress emergency support to help you quickly fix these issues even before your hosting provider responds.