If you are seeing an HTTP error while uploading the images to media library, below are the possible reasons and troubleshooting steps to solve them:

  1. Sometimes, it might be some temporary server glitch so you can try to wait and check back later, if the issue persists, first we need to make sure what is causing the trouble. It might be a theme, plugin, WordPress or some server specific issue.
  2. Try disabling all plugins and see if that fixes the issue, if it fixes the issue, that means one of the plugin is conflicting, you can try enabling them one by one and keep checking the image upload after each plugin activation, this will give you the conflicting plugin, you can replace the plugin with some similar one or contact plugin developer for a fix.
  3. If disabling plugin does not fix the issue, that means it is not a plugin conflict, and you can try switching to the default WordPress theme momentarily and check. If the issue i fixed, then the problem is with your previously activated theme and you need to contact the theme support.
  4. Having backend and front end on different URLS also might create such trouble, For example if you have installed SSL but the site URL in Settings > General and actual site URL on frontend are not same, then also this error might come, in that case, please make sure you have same http protocol in General Settings and on front end as well.
  5. If the issue persists with with the default WordPress theme, then it might be something related to WordPress or a server side issue. First thing you can try is making GD library as default image handler for your WordPress installation, you can add this code in the funcions.php file of your child theme. Note: You can learn about creating a Child theme here. 
function wpb_image_editor_default_to_gd( $editors ) {
    $gd_editor = 'WP_Image_Editor_GD';
    $editors = array_diff( $editors, array( $gd_editor ) );
    array_unshift( $editors, $gd_editor );
    return $editors;
}
add_filter( 'wp_image_editors', 'wpb_image_editor_default_to_gd' );

If this does not fix the issue, you can remove the code and proceed to further steps given below.

       5. Try to increase the memory by writing this line of code in the wp-config.php file.

define( 'WP_MEMORY_LIMIT', '256M' );

      6. If the above step also does not help, please add this code in htaccess file

SetEnv MAGICK_THREAD_LIMIT 1

      7. If this also does not work, you should contact your hosting provider as it might be another issue specific to your server configurations.

Did this answer your question?