image upload error

How to Fix Image Upload Error in WordPress?

In Wordpress by Shabnam Rafique BajwaLeave a Comment

The image upload issue is one of the most irritating errors of WordPress. For most of the beginner image upload errors can be quite complex because it occurs without doing anything different. But it is quite easy to fix this image upload error in WordPress. Have a look at how WordPress display this error (screenshot below)

image upload error

How to fix the image upload error?

There are 2 different scenarios you have to focus on. Check whether the image upload issue occurs for all images that are already available in the library or for only one image?

If it is occurring for all images then you can try the following solution:

  1. Change the file permission
  2. Deactivate plugin
  3. Increase the memory limit
  4. Remove file path for media settings

And if it occurs for only one image then you can resolve it by following methods:

  1. Rename the image

Let’s discuss them in detail and resolve the issue of image upload in WordPress.

1. Change file permissions

It might possible that when your host makes an update on your server they affect your site file permissions which causes the image upload error in wordpress. To change your file permissions do the following steps:

  1. Access your site through FTP
  2. Access your site files and open site root directory
  3. Open your wp-content folder, you will find your upload folder init
  4. Right-click on Upload folder and select file permissions
  5. Set the numeric value to 744 (note of the numeric value that is already there)
  6. Select the  Apply to the directory only radio button
  7. Click on the Ok button to save changes.

Try these steps and if it doesn’t work for you then move to the next solution.

2. Deactivate Plugins

If you are using the plugin to optimize your images, deactivate it before uploading the image and see if that fixes the error or not? Simply deactivate the plugins by going to the plugin list in your dashboard. This will deactivate all plugins. If this fixes your issue that means one of your plugins is the cause of this error. Now activate them one by one, reload your site after each activation and note when your image begins to upload then that is a misbehaving plugin. Reach out the plugin developer for help.

Continue to the next solution if deactivating plugins doesn’t work for you.

3. Increase PHP memory limit

It might possible that you can not upload the image due to the PHP memory limit. To resolve this issue you have to increase the PHP memory limit. For this purpose, you have to add the following line of code to your wp-config.php file.

You can also use the .htaccess file in your wordpress root directory to increase the memory limit. Simply add the following line in it.

4. Remove File Path from Media Settings

If the above solutions don’t work for you then try this solution to resolve the issue of image upload error in wordpress. Remove the file path from your media library page. To do this follow these steps:

  1. Sign in to your admin area
  2. Open your settings menu and select media library
  3. If you see a file path with a textbox displaying where the files should be uploaded to, delete the text in the file path textbox
  4. Click on save button to save your changes

Refresh your site and try to upload the image again.

5.  Rename your file

If you are facing this issue with one image, then try this solution it is easier than previous solutions. Try to rename your file on your computer before uploading it to WordPress. Keep in mind these three things:

  1. Make sure that there are no apostrophes in your file name which can cause this error.
  2. Make sure your file names are written in lowercase letter
  3. Change your file type e.g from .jpg to .png file

Try these solutions to resolve the issue of image uploading in WordPress. if you have any questions regarding this article or you face any difficulty in resolving this image uploading issue in wordpress mention it in comments.

Thanks.

About the Author
Shabnam Rafique Bajwa

Shabnam Rafique Bajwa

Shabnam Rafique Bajwa is working as a Content writer at HFarazm. Her educational background is in Software Engineering from the University of Lahore and Masters in Software Engineering from Superior University.

Leave a Comment