What to do when you cannot upload images to WordPress

Home - WordPress Security - What to do when you cannot upload images to WordPress
cannot-upload-image
Are you unable to upload pictures to your website? Indeed, you must be wondering why you cannot upload images to WordPress. In this case, you are getting either a file size error or a WordPress HTTP error.

The WordPress image upload errors may occur when you least expect or after implementing some changes on your website. Nonetheless, finding out why you can’t upload images to WordPress and how to fix the error needs your effort.

In this guide, we have compiled the solutions based on the upload errors you might be experiencing. In short, we have grouped the solutions to help you find the appropriate solution for the specific errors for can’t upload any more images on my WordPress website.

Common ‘Cannot Upload Images to WordPress’ Errors and How to Fix them

It is easier to fix most WordPress image upload errors if you know the solutions you need to try first. Therefore, the answers in this guide are put into categories based on the WordPress errors you might be experiencing.

1. When You See File size errors

Enter your text here...This WordPress error occurs when the image you are uploading is larger in size than the allocated file size limit for image uploads.

How to fix: increase the max file size

To do this, go to your primary WordPress folder>>php.ini file>> Add this text:

upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300

Enter your text here...In case you are unable to locate your php.ini file in your WordPress folder, all you need is to: Create the php.ini file>> then paste the above text>> and upload the file to your primary WordPress folder.

As a result, you will be able to increase the max file size and upload images.However, some WordPress web hosting solutions block you from increasing the set upload size limit. Did you try to increase the size, but it never worked? You might need to request your hosting provider to increase it on your behalf. To check this, go to Media>>Add New.

2. If Uploading gives a WordPress HTTP Error

hosting-service

Many issues can result in an HTTP error. But, the two most common causes of this error are:

  • Many threads in your image processor.
  • WordPress memory issues.

How to fix: increase the memory limit to fix cannot upload images to WordPress issues

Do you know that low memory in WordPress can cause many problems? One of these issues is that I can’t upload images to WordPress. Instead, you get an HTTP error because the WordPress images fail to upload.

In this case, we are increasing the memory used to make applications on your server to run. To expand the memory limit, you need to use an FTP to access your WordPress website. After that, open the folder that contains your WP files. Here, locate and start editing your wp-config file to add this code:

define( 'WP_MEMORY_LIMIT', '256M' )

In turn, your PHP memory will increase by 256M, and the WordPress HTTP error fixed if the memory was the cause.

How to fix: set your image processor to utilize one thread

WordPress handles images using image processors. One of them is Imagick, whose design entails utilizing many threads to increase image processing speed. However, some web hosting providers restrict the multi-thread feature. This might lead to can’t upload any more images on my WordPress website HTTP error.

To solve this problem, you need to use an FTP to access your WordPress website. The next step is to find your .htaccess file. Next, edit your .htaccess file to add this configuration:

SetEnv MAGICK_THREAD_LIMIT 1

To check if you have fixed the error, try to upload your image.

3. If You Cannot Upload a Specific File

Are you unable to upload a specific file while the upload of other files is OK? If so, use any of these two easy methods to fix this issue:

How to fix: Rename the image

If your image file has accent letters or special characters like @,#,$, you need to remove them. To do so, just rename your file and then upload it to your WordPress.

How to fix: Resize your image to fix the upload issues

developer

Your specific image file might fail to upload because it has too large dimensions. To solve this issue, you need to resize your image and make it smaller. You can do so using the Picresize online tool or any image editor. This plays a critical role in your WordPress SEO Optimization.

4. If You Cannot Upload (Recently Moved to Another Host or Media Gallery Shows Blank Images)

Sometimes, you might experience some upload issues where you see blanks in your gallery rather than seeing good images. In this case, your upload folder might be the cause.

To set the ideal permission for your upload folder, you need an FTP to access your website. Once you access your site, go to your “wp-content” folder and open it by double-clicking.

Here, navigate to the “uploads” folder, and then right-click on it. Next, select the File Permissions.

Now, set your numeric value to be 744, then tick(check) the “Recurse into subdirectories," and select the "Apply to directories only.” Finally, click on the "OK" button.

ftp

To check if your images are displaying, reload your library and try to upload a file.

NB: If the 744 value fails to fix your issue, repeat the entire process but remember to set the permission as 755.

Additional Solutions to Fix Can’t Upload Images to WordPress Issues

Disable plugins

Sometimes, all you need to fix the image upload issues is to disable your WordPress plugins. After that, check the plugin that causes the problem by enabling one by one.

Clear cache

Are you using a caching plugin? You can try to fix this image upload error by clearing the cache of your plugin.

Use the native browser uploader

You can fix the image upload issues on your WordPress by using a native browser uploader. Here is how to switch to your native browser:

Go to your WordPress dashboard>>Media>>Add New>>browser uploader.

Conclusion

The above solutions will help you fix the image upload errors on your WordPress website. Nevertheless, diagnosing and fixing the image upload issues may be difficult sometimes. If the problem continues, try to contact your web hosting for help. You can also get help from our WordPress expert developers for any WordPress issue.

CLIENTS REVIEWS