Tutorials for web designers and developers
Tutorials for Developers_

How to Fix Image Upload Error in WordPress?

image upload error

The image upload issue shown above is one of the most irritating errors of WordPress. For most beginner image upload errors can be quite complex because it occurs without any notice. But it is quite easy to fix this image upload error in WordPress.

How to fix the image upload error?

Here are different methods to fix image upload error:

  1. Change the file permission
  2. Deactivate plugin
  3. Increase the memory limit
  4. Remove file path for media settings
  5. 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 website hosting makes an update on the 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. Goto folder: wp-content/uploads
  3. Right-click on ‘Uploads’ folder and select file permissions
  4. Set the numeric value (permissions) to 744
  5. Select the Apply to the directory only option
  6. 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 all plugins by going to the plugin list in your dashboard. If this fixes the upload issue that means one of your plugins is faulty. Now activate plugins one by one, reload your site after each activation and note when your image begins to upload then figure out which plugin breaks the site. 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.

define('WP_MEMORY_LIMIT', '64M');

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

php_value memory_limit 64M

4. Remove File Path from Media Settings

If the above solutions doesn’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.

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp
Share on email

Leave a Reply

Your email address will not be published.