There are several reasons if you see “HTTP Error” while trying to upload a new image in your WP Media Library or attaching a featured image to one of your post/page.
Basically, WordPress is unable to figure out the cause and that’s why it displays the generic ‘HTTP error’ message for the same. So let’s take a look how to troubleshoot this error.
- Confirm if it’s not a temporary problemTo be able to make sure that this is not a temporary problem, your first step should be to wait for few minutes and then try uploading the image again. As some time there are problems while the hosting server due to some unusual traffic on your hosting IP or on your shared hosting account.If waiting doesn’t resolve the problem and the error still exists then the next step is to try changing the extension of the image or save it as a new image in different format. For example save your current .jpeg image as .png and try uploading it.
So, changing the image extension is not helping you to resolve the HTTP Error then the last step to verify if this is not a temporary problem is to try uploading a totally different image from your system. If it goes well and error is just gone then there can be a glitch with the last image itself which you were trying to upload.
- Increase WordPress Memory LimitThe very common error for this HTTP error is that there is not enough memory available on your hosting server to be used by your WordPress website. There is high percentage that your problem will be solved by increasing the memory limit for your WP website. To do so, you will have to make changes to your wp-config.php file See how to do this
PHP1define( 'WP_MEMORY_LIMIT', '256M' );
- Change Image Editor Library Used by WordPress
This is the last and best option which works for many people I suggested with.WordPress runs on PHP language which use two modules to handle images. These modules are called GD Library and Imagick. WordPress may use either one of them depending on which one is available.
However, Imagick is known to often run into memory issues causing the http error during image uploads. To fix this, you can make the GD Library your default image editor.
You can do this by simply installing this plugin through your WP Dashboard => Plugins => Add New Page. Once installed, activate the plugin. There is no settings page for this plugin, it works just out of the box.
Once the plugin is activated you may try uploading your image to media library. I am sure this will work for most of the users but for those who still facing the same error please open a support ticket here for the team to check it for you.