Many of you must have faced Image uploading issue on your WordPress site. It’s a very common issue. Many beginners found it irritating and confusing because it appears suddenly, making it impossible to predict. It has no clear solution. Most of us wonder how to fix the image upload issue in WordPress.
Creating a backup of your site prior is not something that will solve this issue but we are listing 7 different options which will help you to resolve this issue.
Let’s get started!
Before jumping to the solutions let’s see what causes this issue.
Basically, the incorrect file permissions can be the cause of this issue which resulted in preventing WordPress site from uploading or reading a file on your hosting server and you will encounter the following error:
The file permissions can be sometimes changed due to misconfiguration on a shared hosting server without you even doing anything. file permissions can be easily redressed if everything else is working fine on your WordPress site.
Or the disappearance of an image from the media library can also be the cause of this error.
- 1 Check if the Image Upload Issue Occur for only One Image or All?
- 2 Rename Your File To Fix Image Uploading Issue
- 3 Optimize your Image
- 4 Change the File Permissions
- 5 Deactivate All Plugins
- 6 From the Media Settings Page, Remove the File Path
- 7 Enlarge Your Site’sPHP Memory Limit
- 8 Check the PHP Version
- 9 Final Words
Check if the Image Upload Issue Occur for only One Image or All?
If it’s for only one image then
- rename the image
- you should decrease the image’s resolution
and the error will be fixed.
If the issue occurs in all images then there are various steps to fix this:
- Change file permissions.
- Deactivate plugins.
- On the media settings page, remove the file path.
- Enlarge your site’s PHP memory limits.
- Check the PHP version as it can also cause these issues.
Rename Your File To Fix Image Uploading Issue
You can rename your file on the computer prior uploading it to WordPress if the issue is with one image. File names should not be written in upper case so, make sure they are in lower case and there are no apostrophes. As both of these things will cause the error to have appeared.
Try interchanging a .png file into a .jpg file and vice versa, if you still see the error.
Optimize your Image
If you had uploaded the Image having a larger resolution then there’s a possibility to encounter different issues. Moreover, the larger the Image more it will hit your site’s memory limit.
your blog post image should not be wider than your content width only a featured or header image should be. To configure your content width, right-click on any blog post and select Inspect Element and find a class called “content” it will display the width of your content area in a yellow pop-up box.
Now the main content width is displayed and you should try to keep your images size equal or below to this width. You can resize the images in Photoshop or other software like GIMP, and re-upload it.
Change the File Permissions
For changing file permissions you need to use an FTP client and connect your website via FTP.
Step-1: Go to wp-content folder > then Uploads folder > right click on the uploads directory > File Permissions.
Step-2: In the file permissions dialogue box you need to set file permissions. You need to set the numeric value to 744.
Step-3: Also, click on the checkbox next to Recurse into subdirectories option and then click on the radio button ‘Apply to directories only’’ as shown below:
Step-4: Click on OK to save these changes and now your FTP client will start applying file permissions to the directories. (Remember if 744 doesn’t works for you then try using 755 instead.
Step-5: Now you need to set the file permissions for all other files. For that, you need to change the numeric value to 644 in the dialogue box. And again, click on the checkbox next to Recurse into subdirectories option and then click on the radio button ‘Apply to directories only’’ as shown below:
Hence, you are done setting the permissions and now go back to your WordPress admin area and try to upload your images again.
You can also use the file manager provided by your WordPress hosting company if you don’t know how to use an FTP client, Talk to their support and they quill provide you with some instructions.
Deactivate All Plugins
If the error is still not fixed then try identifying and replacing those plugins which you use to optimize the image to resolve this issue. Start deactivating your plugins and after that refresh your site to check whether you see the error while uploading the image or not. FTP client will also help you to identify the faulty plugins.
From the Media Settings Page, Remove the File Path
This is not a very popular solution though it has always worked.
Step-1: Go to WordPress admin area > settings > Select Media.
Step-2: Find a file path with a textbox which shows “where the files should be uploaded to”.
Step-3: You need to delete the text in the file path textbox.
Step-4: Click on Save Changes.
Note: if you only see dimensions for images in media settings page and a setting that says your files should be organized into month/year folders, then this solution is not useful in this case.
Enlarge Your Site’sPHP Memory Limit
You can troubleshoot the error by Expanding your PHP Memory limit you mainly get this error while uploading an image in your wp-admin, it’s actually because your memory limit is exhausted. The following steps can help increase memory:
Step-1: Open your wp-config.php file in the WordPress root directory and search if WP_MEMORY_LIMIT exists or you can create a blank text file named php.ini.
Step-2: Now define memory limit and Paste this code in there: memory=250MB(you can increase memory limit up to 250)
Step-3: Save the file, then open your root directory and upload this file to your /wp-admin/ folder using FTP.
The original file is replaced and now you need to Refresh your FTP client. Now try to upload the image again and see whether this error is resolved or not.
Check the PHP Version
WordPress is developed using PHP and has its own updates.WordPress recommends PHP 5.6 or later. Some people have fixed this image upload issue by upgrading the version of PHP.
To do this, go to cPanel > PHP Config > Programming, Software/Services or Advanced sections.
Note: If you are a beginner then site backup is recommended as upgrading might break your site.
Lastly, Go to PHP config > select a different PHP version > save changes.
The Image uploading issue in WordPress is usually caused by things like the malfunctioning of plugins or caused by the unsupported PHP version, you can troubleshoot these issues easily as described above. And always consider talking to your host if nothing worked as they have far more sophisticated tools than you do to locate and fix these uploading issues.
We hope this article helped you fix the image uploading issue on WordPress site and if you have any further questions about fixing the Image upload issue, please don’t hesitate to reach us out.