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.
Table of Contents
How to fix the image upload error?
Here are different methods to fix image upload error:
- Change the file permission
- Deactivate plugin
- Increase the memory limit
- Remove file path for media settings
- 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:
- Access your site through FTP
- Goto folder: wp-content/uploads
- Right-click on ‘Uploads’ folder and select file permissions
- Set the numeric value (permissions) to 744
- Select the Apply to the directory only option
- 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.
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:
- Sign in to your admin area
- Open your settings menu and select media library
- 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
- 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:
- Make sure that there are no apostrophes in your file name which can cause this error.
- Make sure your file names are written in lowercase letter
- 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.