wordpress cannot upload images

WordPress Cannot Upload Images – How to Fix?

When WordPress cannot upload images, the underlying cause of the issue could be various reasons. The choice of possible solutions to resolve the problem is also diverse. The WordPress image upload issue is mostly a randomly occurring error in WordPress. Another instance when the issue may occur is when you make changes to your site. For these reasons, it’s difficult to predict when the issue could happen. The good news is that the issue is relatively easy to fix; you may pick several possible solutions to resolve the issue. 

In this guide, we’ll explain how to fix WordPress cannot upload images issue easily. Let’s go over the probable causes and associated solutions.

Why WordPress Cannot Upload Images – The Causes & Solutions

1st Cause: Incorrect File and Directory Permissions

One of the main culprits behind the image upload issue in WordPress is — incorrect file permissions. Your web hosting server is the place where your WordPress files are stored. WordPress cannot read or upload files on your hosting server without the correct directory and file permissions.

When your upload folder doesn’t have the right permissions, you may see blank images in your gallery, like below:

WordPress Cannot Upload Image

Solution –  Ensure your upload folder has the correct permissions.

This solution involves changing file permissions for your upload folder using an FTP client or your host’s control panel. The steps for resolving the issue using an FTP client are as follows.

Step 1 – Access the storage area of your WordPress media uploads. For that, using an FTP client, visit your website, and go to the /wp-content/ folder >> uploads folder. 

(Note: The storage area of your media uploads include all your image files as well.)

Step 2 – Select File Permissions by right-clicking on the uploads folder.

fix WordPress Cannot Upload Images

Step 3 – In the file permissions dialog box, to make your selections for the new attributes for the directory “uploads” and all the subdirectories within it, set it to 744. Enter 744 in the “Numeric value” text box to do that. 

wordpress cannot upload images Incorrect File and Directory

Next, ensure you’ve checked the box next to the option that reads “Recurse into subdirectories” and selected the radio button that reads “Apply to directories only.” Then click the ‘OK’ button to save your changes.

Performing this step ensures file permissions are applied to the directories via the FTP client. If the new attributes of directory permissions that were set to 744 don’t work, you may try 755 instead.

To set file permissions for the entire uploads directory:

Step 1 –  Begin by selecting File Permissions by right-clicking on the uploads folder.

Step 2 – In the file permissions dialog box, make your selections for the new attributes for the directory “uploads” and all the subdirectories within it to 644. Enter 644 in the “Numeric value” text box to do that. 

Next, ensure you’ve checked the box next to the option that reads “Recurse into subdirectories” and selected the radio button next to “Apply to files only.” Then, click the ‘OK’ button to save your changes.

After successfully changing the permissions for all files of the uploads folder via the FTP client, reload your library to check if your images are now displaying. Next, try to upload a file.

How to fix wordpress image issue

2nd Cause: Plugin Issue

Plugins installed for image optimization could be causing the WordPress image upload issue. 

Solution –  Deactivate Your Plugin(s) & Install a New Image Optimization Plugin

Try disabling any installed plugin that is meant for image optimization. Then, try uploading images again to check whether the image upload issue is fixed. If that doesn’t put an end to the problem, try deactivating all your plugins to determine whether the issue resulted from having reached your memory limits. Whenever your site is stuffed with plugin use (too many plugins), you may end up exceeding your site’s memory limits, which deters you from uploading further media files. If it’s a memory issue, try the 3rd solution we’ve outlined next. 

Did disabling your image optimization plugin fix the issue? If it did, it would be a good idea to replace it with a new plugin to do the same job without causing issues. Alternatively, you could try contacting the developer for a fix. 

3rd Cause: Your Overgrown Site Is Nearing/Exceeding Its WordPress and PHP Memory Limits

Does your WordPress site run on a shared hosting server? If yes, there is a likelihood the shared host has allowed you limited memory for usage. That could be the reason you cannot upload images. Things like too many plugins at work and an overburdened media storage area could have led your website to have reached its WordPress and PHP memory limits. As a result, you need to increase your site’s memory.

Solution –  Increase Your WordPress Website’s Memory Limit

You might get a WordPress HTTP error when uploading images. To resolve this, you may have to resort to requesting your web host for memory enhancement, especially if you’re on a shared hosting server. However, to increase the memory limit in WordPress yourself, you’re required to access your site via FTP and open your WordPress files folder.

In the folder that contains your WordPress files, find and edit the wp-config file by adding the following code:

define( ‘WP_MEMORY_LIMIT’, ‘256M’ )

By adding the above code, your PHP memory limit is enhanced to 256M. Thus, fixing your memory-related WordPress HTTP error that caused the image upload failure.

4th Cause: Your Image File Size Is Larger Than The File Size Limit

The image you’re trying to upload shouldn’t be larger than the file size limit. If it is, you would have to raise the file size limit. 

Solution –  Increase Your WordPress File Size Limit

To raise the file size limit, you’ll have to access your website via an FTP server and edit your files by adding some code. To do that, in your main WordPress folder, look for your php.ini file and add the following lines of code:

upload_max_filesize = 128M

post_max_size = 128M

max_execution_time = 300

This is how you can increase your file size limit and upload your images successfully.

5th Cause: You’re Experiencing The Issue With One Particular File Only

If you’re experiencing the issue of being unable to upload image files on WordPress in one file rather than all, there are two solutions you should try. 

Solution 1 –  Resize Your File To Fix The Image Upload Issue

If you’re unable to upload one of the images due to its size (dimensions) being too large, there is a quick and easy method to fix this. You need to make the image size smaller by altering its dimensions using an image editor like ‘Paint’ or an online tool like ‘Picresize.’

Besides facing an image upload issue, larger than permissible images also lead you to reach your site’s memory too quickly. To prevent this from happening, you could follow a few basic rules. Among those, one of the main rules is to ensure you don’t end up uploading a regular blog post image wider in size than your content width. The only exception to that rule being, the image can be wider if it’s a featured or header image. To find out the limits of your content width, right-click anywhere within any of your site’s blog posts, then select ‘Inspect Element.’

Solution 2 – Rename Your Image File To Fix The Image Upload Issue

A file with its name having special characters ($, *, &, # …), accent letters (ñ, á, é …), or apostrophes can fail to upload. There is a quick fix to the issue, rename the image file on your computer without any special characters or accent letters in the new name. Then, upload the media files to WordPress and see if the issue has been resolved. 

Another useful tip is to ensure the file name is in all lowercase letters. If the issue still doesn’t resolve, try changing the file type, for example, type .jpg instead of .png or the other way around.

Final Thoughts

Whenever — and this can randomly happen — your WordPress site cannot upload images, you need to know the various possible reasons and respective solutions. In this guide, we’ve covered the most common reasons and solutions for the image upload issue. 

Do you know any other method to fix the image upload issue in WordPress? If you do, or if you have anything more to add, please comment below to help our readers troubleshoot the issue better.

If you still can’t fix WordPress cannot upload images, try getting in touch with your web host; sometimes, some fixes are specific to a particular web server. 

If you enjoyed reading this guide, you might also gain from reading about “How to Change Your WordPress Password?” and 4 Ways to Perform WordPress Database Cleanup.

Leave a Comment

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