How to Fix Image Upload Issues in WordPress

How to Fix Image Upload Issues in WordPress: HTTP error, file size error and others

If you are unable to upload images, you are no doubt wondering what is causing image upload issues in WordPress and how to fix it. You may be getting a WordPress HTTP error, or a file size error.

WordPress image upload errors can begin unexpectedly, or in some cases, after you make changes to your site.  Either way, it takes some effort to find out why WordPress cannot upload images or videos and to resolve it.

In this article, we have grouped the solutions according to the errors you may be getting. This grouping will help you identify the most likely solution for the particular errors when uploading images you are facing.


Common Image Upload Errors and How To Fix Them

  1. When you cannot upload a particular file
  1. When you get file size errors
  1. When you cannot upload (and your media gallery shows blank images, or you recently migrated to another host)
  1. When you are getting an HTTP error:
  1. Other Solutions

Common Image Upload Errors in WordPress and How To Fix Them

From experience, some WordPress image upload issues are easier to resolve when you know which solutions to try first. The solutions have thus been grouped according to the WordPress errors you may be seeing.

Note, however, that all the solutions can work for any errors, so if the recommended solutions for your issue don’t fix it, go on to try all others.

When You Cannot Upload a Particular File

If you are seeing this issue with one file but all others upload properly, then there are two easy solutions to fix this.

Resize the image to solve image upload issues in WordPress

A particular image file may not upload is because the image dimension is too large. To fix this, change your image size to make it smaller. You can do this with any image editor, or even easier, simply use Picresize online tool to fix the issue.

See also how to optimize your images for the web for more on this subject.

Rename the image

If the file name contains special characters ($, *, &, # …) or accent letters (ñ, á, é …), rename the image file to remove these characters and then upload media to WordPress.

When you get file size errors

This happens when the image you are trying to upload is larger than the file size limit for uploads.

Increase max file size

To increase max file size, check your main WordPress folder for your php.ini file and add this text to it (if you cannot find the file, create a php.ini file, paste in this text, and upload it to your main WordPress folder):

upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300

This would increase your limit and you should be able to upload your images.

Note that some WordPress hosts prevent you from increasing the upload size limit. If you tried increasing and it doesn’t work (check by going to Media > Add New), you would need to ask your host to increase it for you.

When you cannot upload (and your media gallery shows blank images, or you recently migrated to another host)

If you having upload issues, and instead of seeing proper images in your gallery, you see blanks like the picture below, then the issue is likely from your upload folder.

Blank Media Gallery

To fix this, you have to ensure your upload folder has the right permissions.

Change file permission for upload folder

To set the correct folder permission, access your WordPress files using FTP.

Next, locate your “wp-content” folder and double click to open it.

Access wp content folder - How to fix image upload issues in WordPress

In this folder, locate your “uploads” folder, right-click on it, and select File Permissions.

Change file permssions - How to fix image upload issues in WordPressSet the numeric value to 744, tick “Recurse into subdirectories”, select “Apply to directories only”, and click OK.

Set file permissions

Now reload your library to see if your images display, and then try uploading a file.

Note: In some cases, setting to 744 may not fix your issue. If this happens, repeat the process but this time set the permission to 755.

When You Are Getting a WordPress HTTP Error When Uploading

An HTTP error can be caused by a number of issues, some of which we have considered above. However, the two most likely causes are (1) WordPress memory problems. (2) Multiple threads in your image processor.

Increase the memory limit to solve image upload issues in WordPress

Low memory in WordPress could lead to many issues. One of them is WordPress images not uploading, and you seeing an HTTP error instead. The memory we’re referring to here is the one used to run applications on your server, and is different from the max file size we increased above.

To increase memory limit in WordPress, access your site using ftp and open the folder containing your WordPress files.

In this folder, locate and edit your wp-config file to include the following code:

define( 'WP_MEMORY_LIMIT', '256M' )

Fix WordPress HTTP error

This increases your PHP memory limit to 256M and would fix your WordPress HTTP error if its cause is memory-related.

Set the image processor to use one thread

Imagick is one of the two image processors WordPress uses to handle images. This processor was designed to use multiple threads to speed up image processing. However, multi-thread feature is restricted by some web hosts and this could lead to HTTP error when you try to upload.

To fix this issue, access your website using ftp. Next, locate your htaccess file and edit it to include the following configuration.


How to fix WordPress HTTP error

Now try uploading an image to see if the error is fixed.

Other Solutions for Fixing Image Upload Issues in WordPress

Here are two more solutions you can try.

Use the browser uploader

The native browser uploader can help get you around uploading issues in WordPress. Follow these steps to switch to the native uploader.

In your dashboard, go to Media > Add New.

Next, click browser uploader.

Use Browser Uploader - How to fix image upload issues in WordPress

Try uploading this way to see if it fixes your issue.

Clear cache if you are using a caching plugin

Some WordPress users have been able to fix this issue by simply clearing the cache on their caching plugin.

If you are using a caching plugin, try this to see if it fixes your issue.

Disable Plugins

In some cases, you can resolve image upload issues by disabling all your plugins and then gradually tracing the plugin causing the issue. Read this guide to learn how: How To Disable WordPress Plugins Using FTP.

Frequently Asked Questions

What are some common image upload issues in WordPress?

Common image upload issues in WordPress include the following:

  • File exceeds the maximum upload size.
  • Incorrect file permissions.
  • Memory limit exhaustion.
  • Incompatible image file format.
  • HTTP error during the upload process.

How can I increase the maximum upload size in WordPress?

You can increase the maximum upload size in WordPress by:

  • Modifying the php.ini file.
  • Editing the .htaccess file.
  • Updating the wp-config.php file.
  • Contacting your hosting provider for assistance.

How can I fix incorrect file permissions?

To fix incorrect file permissions, follow these steps:

  • Access your WordPress files via FTP or cPanel.
  • Navigate to the “wp-content” folder.
  • Right-click the “uploads” folder and select “File Permissions.”
  • Set the numeric value to 755 or 750 and apply the changes.

How can I resolve memory limit exhaustion?

To resolve memory limit exhaustion, you can:

  • Increase the memory limit in the php.ini file.
  • Add or modify the WP_MEMORY_LIMIT constant in the wp-config.php file.
  • Contact your hosting provider for assistance.

What image file formats are supported in WordPress?

WordPress supports the following image file formats:

  • JPEG
  • PNG
  • GIF
  • WebP (supported in WordPress 5.8 and later)

How can I fix an HTTP error during the image upload process?

To fix an HTTP error during the image upload process, you can try the following solutions:

  • Refresh the page and try uploading the image again.
  • Reduce the image file size or change its dimensions.
  • Disable your plugins temporarily to check for conflicts.
  • Switch to the default WordPress theme to rule out theme-related issues.
  • Increase the PHP memory limit or max_execution_time.

Why do I get an error message stating that the uploaded file could not be moved to wp-content/uploads?

This error occurs due to incorrect file permissions or ownership. To fix this issue:

  • Check and correct the file permissions for the “uploads” folder (see Q3 for steps).
  • Contact your hosting provider to verify and correct the file ownership settings.

How can I prevent image upload issues in the future?

To prevent image upload issues in the future, consider these best practices:

  • Regularly update your WordPress installation, plugins, and themes.
  • Use supported image file formats (JPEG, PNG, GIF, or WebP).
  • Optimize images for the web to reduce file sizes.
  • Regularly monitor and maintain your website’s file permissions and ownership settings.
  • Choose a reliable hosting provider with sufficient resources to handle your website’s traffic and storage needs.

Conclusion on Image Upload Issues in WordPress

The steps covered in this guide have shown you how to fix the image upload issue in WordPress. However, image upload problems can sometimes be difficult to diagnose and fix.

If you still can’t upload images to WordPress media library, then you may need expert help. Request our service and one of our developers will get to work immediately to fix your issue.

You may also try contacting your web host. They may know if there are configurations or fixes that are unique to their servers. If you have fixed this issue using methods not covered in this guide, please share them with our readers in the comments below. For more WordPress tutorials and step by step guides, check our WP College blog.

 This post was written by Mesheal Fegor

Mesheal Fegor is a Web/WordPress Developer and technical writer. His WordPress help articles have been featured on Kinsta and other sites. Mesheal holds a master's degree in computer science. His writing focuses on technical WordPress issues, ranging from core WordPress problems, to issues with WooCommerce, and more.

Last edited by: FixRunner Team