Do you face image upload issues on WordPress? Are you wondering how to fix image upload issues in WordPress? Many newcomers face broken image issues. It seems to be pretty confusing for them. They followed all the steps to upload the image. Despite that, getting a blank image error is frustrating for beginners.

Image upload failures are a common issue on WordPress. There are various reasons causing image upload failure. So don’t worry, and we have the fix. But let us discuss the causes first.

What Are The Reasons For WordPress Image Upload Issues?

Incorrect File Permission can Call for Trouble

The error message you get to see on screen is ‘Unable to create directory wp-content/uploads/2019/04. Is its parent directory writable by the server?’

You want to access the WordPress files from the web hosting server where you have stored your files. Therefore, you need access permission for that specific file and directory to access it.

Sometimes you may encounter the error message for image upload error in WordPress as ‘The uploaded file could not be moved to wp-content/uploads/.’

This might happen when you cannot see or locate the image in your media library. It looks like the image to be uploaded has disappeared. We have a solution for that too, but first, let us discuss the permission issues.

Also Read :- Send WordPress Uploads to Google Drive (2022) Ultimate Guide

Steps To Solve The Image Upload Issue in WordPress

Let us look at correcting or restoring the permissions back step by step. First, you might wonder who might have changed the file permissions, and you know that your file accesses were working fine. This may not be your fault as there could be multiple reasons this might have happened.

Sometimes your permissions might change because of the wrong remote server configuration on your shared hosting server. For example, this might have been caused because your hosting package service provider has upgraded the server, resulting in the change of permission. If all other things look good, you need to correct the permissions to fix image upload issues.

How To Fix Image Upload Issues in WordPress Using FTP Client?

To change the file permission, you need to leverage an FTP client. To do that, follow the below-given steps.

Step 1: Connect your website using the FTP client.

Step 2: Go to /wp-content/folder

Step 3: Inside the folder, locate the “Uploads” folder. WordPress saves all media files inside this folder. This folder will store the images for file uploads.

Step 4: Right-click on the Uploads folder and select File Permissions from the list. You will see the file permissions dialogue box on the screen.

Step 5: The numeric value field needs to be set to 744 for the uploads directory and all the subdirectories under the uploads directory. Enter the numeric value 744 in the box “numeric value.”

Step 6: You need to check the box “Recurse into subdirectories.” Then, press the radio button for the option “Apply to directories only.”

Step 7: You need to hit the OK to change the update button. This will apply to the changes you have made. Your FTP client will apply the permissions file permissions to the directories.

Step 8: If the problem is not fixed, repeat the same method but use the numeric value 755 instead of 744.

Step 9: To change the File Attributes, you must enter the numeric value “644”. Please note that 744/755 changed the root directory and subdirectories permissions. This step will set file permission for all the files in the uploads directory.

Click on the uploads directory and select the File Permissions as earlier. Then, enter ‘644’ in the numeric value field, next check the box ‘Recurse into subdirectories and click the radio button ‘Apply to files only.

Step 10: Click on the OK. This will apply to all the changes you have made. The FTP client will apply the changes to all files in the upload folder. Once done, you can now go to the WordPress Admin to try uploading the images again.

Consider Renaming, Resizing, and Re-Uploading The Images

Revisit the file name if you have issues with a specific image upload. For example, using special characters like $, *, &, #, or accent letters like ñ, á, é can create issues in the WordPress uploader. So refrain from naming your image files using special or accent characters or letters. If you have done that, rename the image file.

Image files can be significant. Having an image larger can create a massive file with high pixel size or dimensions. This can occur in product images. You can reduce the dimensions using the free image resizing tools on the internet. If you are using a high-resolution image, reduce the file size. Leveraging an image editor, you can reduce the file size without affecting the quality of the image. Any free image compressing tool for ONG or JPEG will do the trick.

If your image size is large, you may use high-resolution graphics and encounter this issue frequently. First, check the WordPress file size limit. You might have kept it too low to accommodate the file size you want.

Increase the file limit to your site’s PHP.ini file by adding the code below and ensure you don’t make a syntax error in writing the code. Double-check before running the code.

upload_max_filesize = 128M

post_max_size = 128M

max_execution_time = 300

If your site does not have a php.ini file, you need to create one inside the PHP folder for the current PHP version on your site. Then, add the code at the end of the file, fixing the file size issue for uploads. After that, you can use the image optimizer plugins and re-upload the image on WordPress. This will prevent WordPress File Permission Problems in the Future.

Also Read :- How to Allow Users to Upload Images on a WordPress Site

Increase the Memory Limit

Image files are often more significant than text files. Hence, it occupies more memory. If your memory is running low, you might face uploading issues. When you upload an image file, you may encounter the error message ‘HTTP error.’ This happens when you are running on low server resources of high traffic.

You may need to wait for a few minutes for the resources to be released by the server to process and then try again. If the display issues persist, you have exceeded the WordPress memory limit.

Therefore, you need to increase the PHP memory limit. You can do that by connecting to your site via SFTP. But, first, access your wp_config file and add the following code to increase the limit to 256 MB.

define( 'WP_MEMORY_LIMIT', '256M' )

If the issue persists, the problem might occur because of the threading. WordPress uses either the GD library or the Imagick module to process images. WordPress will pick up the one which is available to you.

Imagick can use multiple threads to expedite image processing. But some shared hosting providers limit Imagick from using multiple threads. This causes the HTTP error, and to resolve this add the below mentioned code to your ‘htaccess file’ to resolve the issue.

SetEnv MAGICK_THREAD_LIMIT 1.

Deactivating Plugins

If you have third-party desktop applications installed on your computer, it might prevent image uploads. In addition, you may have plugins installed for other purposes. You can run a trial by deactivating each one and try uploading to see which one is interfering with your upload.

You can turn off each of them one by one and test. Figure out the one causing the problem and deactivate it to resolve the image upload issues. If the plugins are outdated, you can update them to ensure they are running with their latest versions.

The best practice is to keep your software and caching plugin updated to avoid the system issues described above. If you find the plugins are running on the latest versions, make the plugin developer aware of these issues. This will help the developers to fix image upload issues in their next release.

If the plugging is essential for seamless running of your website and the developer plans no fixes in the upcoming releases, time to look for a better alternative. The best plugins are the ones that have already tackled the WordPress image upload issues successfully.

Clearing Cache

Like memory, the cache is critical to running your website faster and seamlessly. If you have the cache plugin, clean the cache. This will fix image upload issues. Unfortunately, the browser cache does not prevent image uploading often. But cleaning cache before image upload could be helpful, so I mentioned this step as a precaution.

If you find the cache prevents the image upload or causes any kind of error, you can choose the steps to clean the cache based on the caching solution you are using. For example, if you are using W3 Total Cache Plugin, the steps to clean the cache are, go to Performance on the WordPress Toolbar and select Purge All Caches.

You can go to the plugin’s Settings menu to start if you are unsure how to clear the cache of a specific plugin. In addition, you may refer to the developer’s documentation to learn more about how to clear the cache.

Use Browser Uploader

If all the above steps do not work and the issue is still alive, try to use the built-in uploader of the browser you are using. Unfortunately, you will not have all the WordPress Uploader’s features.

For example, your browser uploader may not support the drag & drop feature or multiple file selection to upload multiple images at one go. But they might offer a workaround to upload images faster.

You can access the native image uploader for this, go to media and then select Add New To access the native image uploader of the browser. Here, you can access the image uploader link of your browser.

Next, click on the ‘Choose File,’ which will open the file selection dialogue box for you to upload the image as usual. If this workaround functions for you, you can later use the standard WordPress image uploader to see if it fixes the image upload issues.

Revisiting The Themes You Have Deployed

This solution involves taking the backup of your website. Then you can switch back to the default theme. This is just to experiment whether your current them are causing the problem.

If you can upload the image with your default theme, this will imply that your current theme is causing the image upload issue. Contact your developer to fix image upload issues if that is the case.

Your PHP Version To Be Checked For Most Recent Versions

If nothing works, check if you have updated your PHP version with the recent one or running a previous version. Then you can check the PHP version of your site. First, install the free plugin “Display PHP Version.” Next, you will find a new dashboard added, which will show the current PHP version.

Any version lower than 7 might cause the issue especially, you will face the PHP version issue on the latest WordPress version. WordPress officially recommends PHP 7.4 or higher. We are not saying that it will not work on older PHP versions but recommended is the recent version.

You can get an option to upgrade to the most recent PHP version from the hosting dashboards of most web hosts. If not available, please contact your host’s support to get help.

How To Stop WordPress File Permission Issues Occurring in the Future?

It may not be easy to eliminate this problem forever. This may concern the file types or file extensions of the image file. Unfortunately, there is no one thing that you can fix to prevent file or directory permissions from getting altered to incorrect values in the future.

If the cause is the third-party desktop application, you can simply do away with the tool or the plugin. You can test the WordPress installation or a development environment to experiment. It helps you run trials and make errors without affecting your live WordPress setup.

If your host is causing the problem, there is little you can do in that case. You can only tell them what has happened and rely on them to fix image upload issues. Changing host every time without disturbing your existing setup may not look easy. But if required, you can look for a host replacement.

To prevent future occurrence of the problem related to the file permission, you can leverage the security programs of WordPress test installation or development environment for changes and updates.

Conclusion

Visuals as stunning images add to the beauty of the website content and design. Hence, they are essential to draw and hold the visitor’s attention. However, high Pixel Image upload issues or corrupted files of the image can be frustrating.

Some simple steps explained earlier ease the uploader’s life. Keep tracking the error message and look for an apt solution.

To reiterate the steps we described:

  • Rename, resize, and re-upload the image.
  • Increase the limited memory.
  • Deactivate your plugins.
  • Clear the cache.
  • Try the browser uploader.
  • Check Your Theme.
  • Preventing WordPress File Permission Problems in the Future.

Hope this article was helpful for you in learning how to fix image upload issues in WordPress

LEAVE A REPLY

Please enter your comment!
Please enter your name here