It can be very annoying sometimes when you’re working on your website and all of a sudden you cannot upload your images to your WordPress Dashboard apparently because of the WordPress HTTP error of image. This is a very common issue that WordPress user can face and could be technical to resolve too since there can be numerous reasons of this error. In this article, I will point out what can cause those issues and how it can fixed. These are all based on my own personal experiences;
1. Low PHP Memory
Yes, the low PHP memory of your website can be a reason when the image upload is failing. In order to increase the memory of PHP through WordPress, below constant can be added in wp-config.php file of WordPress installation.
2. Third Party Plugin or Theme Conflict
Sometimes third party plugins or even the active theme can have issues so its good to give it a check by disabling all plugins and enabling a default WordPress theme like Twenty Seventeen. If you are able to upload image then it would be the conflict of the relevant item either the theme or the plugin. Most of the times, the image related plugins can cause this. For example, I had Regenerate Thumbnails plugin activated and once I deactivated, the image upload was fine.
3. Custom Media Directory Path
Check for custom path of media directory in Dashboard -> Settings -> Media section and remove any custom path used as it can bring this trouble of HTTP error too.
4. Corrupted Image
The image upload can fail in case a bad format or corrupted image is tried. You can try using another version of the image like PNG or re-save the actual image.
5. PHP Version Outdated
Recently working on a website, I came across this one when the image upload was not successful and kept on throwing HTTP Error. It was using 5.4 version of PHP and updating it to 7.2 fixed the issue. So it can come down to the PHP version as well. You can update it from your cPanel or if you don’t have access to update PHP then you can contact your website hosting company.
6. Disk Space Reached
Do check if the website hosting you are using has reached its limit for the disk space. You may want to get in touch with the Website Hosting provider to increase the Disk Space.