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.
ContentCommon Image Upload Errors and How To Fix Them
When you cannot upload a particular fileResize the imageRename the imageWhen you get file size errorsIncrease max file sizeWhen you cannot upload (and your media gallery shows blank images, or you recently migrated to another host)Change files permissions for uploads folderWhen you are getting an HTTP error:Increase WordPress memory limitSet the image processor to use one threadOther SolutionsUse the browser uploaderClear cache if you are using a caching pluginDisable pluginsCommon Image Upload Errors in WordPress and How To Fix ThemFrom 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 FileIf 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 WordPressA 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 imageIf 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 errorsThis happens when the image you are trying to upload is larger than the file size limit for uploads.
Increase max file sizeTo 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 = 128Mpost_max_size = 128Mmax_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.
To fix this, you have to ensure your upload folder has the right permissions.
Change file permission for upload folderTo set the correct folder permission, access your WordPress files using FTP.
Next, locate your “wp-content” folder and double click to open it.
In this folder, locate your “uploads” folder, right-click on it, and select File Permissions.
Set the numeric value to 744, tick “Recurse into subdirectories”, select “Apply to directories only”, and click OK.
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.
While fixing file permissions can resolve the issue temporarily, regular site maintenance is key to avoiding such problems. Our WordPress maintenance packages include ongoing support to keep your site’s functionality intact, reducing the likelihood of encountering upload errors.
When You Are Getting a WordPress HTTP Error When UploadingAn 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 WordPressLow 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' )
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 threadImagick 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.
SetEnv MAGICK_THREAD_LIMIT 1
Now try uploading an image to see if the error is fixed.
Other Solutions for Fixing Image Upload Issues in WordPressHere are two more solutions you can try.
Use the browser uploaderThe 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.
Try uploading this way to see if it fixes your issue.
Clear cache if you are using a caching pluginSome 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 PluginsIn 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 QuestionsWhat 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:
JPEGPNGGIFWebP (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 WordPressThe 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.
Read More Useful Articles:How to Install and Configure All in One SEO Pack PluginHow to Fix 'sorry you are not allowed to access this page' Error in WordPressHow to Install WordPress onto a Bluehost Account