How to fix WordPress image upload error

Steps to Fix WordPress Image Upload Errors

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.

Convertio images converter screenshot

Upload your image and select the following WordPress-supported image file extensions: 

  • Jpeg 
  • WEBP
  • PNG
  • GIF 
Convertio images convert tutorial

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”:

WP media library screenshot

Now try reuploading your image from here.

WP media library upload screenshot

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.

Wp add new media file upload screenshot

Click the “browser uploader” link below the main upload area.

Wp browser upload screenshot

Select your file and upload it.

Wp upload new media screenshot

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.

Wp admin dashboard screenshot

Purge Cache: Click the “Purge All” button in the Toolbox section to clear all cached content.

Wp lightspeed plugin cache purge step

Using the WP Rocket plugin to clear the cache

Access Your WordPress Dashboard: Log in to your WordPress admin area.

Wp admin dashboard screenshot

Go to WP Rocket Settings: In the left-hand menu, go to Settings > WP Rocket.

USDigi Wp rocket dashboard screenshort

Clear Cache: On the Dashboard tab, locate the Quick Actions section and click the “CLEAR CACHE” button.

WP rocket purge cache screenshot

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.

Filezilla files directory screenshot

Locate the “wp-config.php” file:

Find the “wp-config.php” file in the root directory of your WordPress installation.

wp-config file screenshot

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’ );

Wp config define Wp memory limit code screenshot

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.

Leave a Reply

Your email address will not be published. Required fields are marked *