{"id":5673,"date":"2020-03-19T15:00:16","date_gmt":"2020-03-19T14:00:16","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=5673"},"modified":"2020-11-19T10:27:45","modified_gmt":"2020-11-19T09:27:45","slug":"fix-image-upload-http-error-wordpress","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/fix-image-upload-http-error-wordpress\/","title":{"rendered":"How to Fix the Image Upload HTTP Error in WordPress"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]You know the old saying &#8211; one picture is worth a thousand words. The explanation for this is less poetic than the saying, but fascinating nevertheless. <strong>Compared to words, images are processed by our brain at a faster rate, so they can easily convey a multitude of information<\/strong>, including highly abstract ideas. On websites, images tell stories, complement your content, create the atmosphere and define your brand.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]So, it is not hard to see why being unable to upload images is the nightmare of every website admin. Moreover, <strong>reading a vague and unhelpful message such as \u201cHTTP error\u201d can make the whole problem even more frustrating<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]In this article, we will guide you through the various causes and methods of tackling the HTTP error that occurs when uploading images in WordPress. You can also use these methods if you\u2019re getting this error when uploading videos, PDF and any other <a href=\"https:\/\/codex.wordpress.org\/Uploading_Files\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress supported media files<\/a>.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">How to Verify the HTTP Error<\/h2>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;21px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/HTTP-error-image-wide.jpg\" class=\"attachment-full size-full\" alt=\"HTTP error image wide\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/HTTP-error-image-wide.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/HTTP-error-image-wide-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/HTTP-error-image-wide-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]There can be<strong> many possible causes for this issue<\/strong>, which is why WordPress displays such a vague message: HTTP error. Since this doesn\u2019t put you any closer to the solution, <strong>you have to be analytical and look for the culprit in several places<\/strong>. Yet before you start panicking and digging, make sure the issue isn\u2019t only temporary.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Sometimes, <strong>the HTTP error happens due to server glitches and a loss of internet connection<\/strong>. Both resolve on their own, so here\u2019s how to determine whether you\u2019re dealing with temporary issues.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Checking for Temporary Issues<\/h3>\n<p>[\/vc_column_text][vc_column_text]If you are getting an HTTP error message, the first thing you should do is <strong>simply wait a few minutes and then try uploading the media file again<\/strong>. If the file is uploaded without any errors, the problem is solved.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If the previous step failed, <strong>try uploading a smaller image or media file<\/strong>. If you upload it successfully, you\u2019ll know the issue was the size of the file. To avoid further issues, reduce the dimensions of the original image or change the file format. Upload it again. You can <strong>also try to change the image format if the issue persists<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If the issue persists,<strong> move on to browser-related tests<\/strong>. Try <strong>refreshing the page and re-uploading the image or media files<\/strong>. If your login session has expired, login to the dashboard and refresh the page by pressing the reload button or the \u201cF5\u201d key on your keyboard. Try reuploading the file.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Expired-login-session-image.jpg\" class=\"attachment-full size-full\" alt=\"Expired login session image\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Expired-login-session-image.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Expired-login-session-image-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Expired-login-session-image-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Keep in mind that, despite its popularity and wide use, <strong>Google Chrome is known to have issues with image upload<\/strong>. <strong>Switch your browser<\/strong> to Firefox, for example, and upload the image again. Also, clear the cache after completing each of these steps and try re-uploading the image or media file.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Clearing the cache after each step will allow you to pinpoint what exactly is causing the issue. [\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Checking Your Plugins and Theme<\/h3>\n<p>[\/vc_column_text][vc_column_text]Sometimes the plugins you use, or even the theme itself, could be the culprit of the HTTP error. It is important to test thoroughly for every possible cause.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]<strong>Plugins that are prone to causing HTTP errors are usually image optimization or security plugins<\/strong>, so make sure you check those first. Deactivate plugins one by one, and after each is deactivated, try uploading an image or media file.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]As soon as the image upload process is successful, you can pinpoint the last deactivated plugin as the source of the error.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To check the WordPress theme, make sure you <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-manually-backup-wordpress-website\/\">backup your site first<\/a>. Then, switch your theme to a default theme (e.g., Twenty Twenty). If the issue is solved afterward, report it to the developers of your theme.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Renaming the File<\/h3>\n<p>[\/vc_column_text][vc_column_text]One of the often-overlooked<strong> reasons for HTTP error is an incorrect file name<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]When you\u2019re naming your file, <strong>make sure you\u2019re using letters, numbers, and dashes only<\/strong>. This means that special characters (for example, the apostrophe or the equals sign) and international language symbols should be avoided.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Our recommendation is to <strong>create a system of naming files<\/strong>. Add dashes between the words and a dash and a number at the end (e.g., my-uploaded-image-1.png, my-uploaded-image-2.png and so forth).[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To determine if the incorrect file name is the source of the issue, <strong>rename the file in your local folder following our guidelines<\/strong>. Upload the renamed image or media file. If the error is no longer present, you\u2019ll know the incorrect file name was the issue.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If the previous steps have given no result, it\u2019s time to turn to some coding solutions. Don\u2019t worry if you have no experience in this field &#8211; we\u2019ll guide you every step of the way!<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;81px&#8221;][vc_separator color=&#8221;custom&#8221; accent_color=&#8221;#f0f0f0&#8243;][vc_empty_space height=&#8221;50px&#8221;][vc_widget_sidebar sidebar_id=&#8221;top-picks-banner&#8221;][vc_empty_space height=&#8221;28px&#8221;][vc_separator color=&#8221;custom&#8221; accent_color=&#8221;#f0f0f0&#8243;][vc_empty_space height=&#8221;80px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">How to Solve the HTTP Error<\/h2>\n<p>[\/vc_column_text][vc_column_text]Insufficient server memory is one of the common reasons for the HTTP error, since an increased memory limit is a requirement for the image upload process. Therefore, <strong>increasing the memory used by the server should solve the issue<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Before we delve into the possible methods of server memory increase, let\u2019s mention <strong>two important prerequisites for this process<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;23px&#8221;]<ul class=\"qodef-unordered-list-item \">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\">Increasing memory is only possible within the limits of your hosting package. Increasing it past these limits will likely result in an internal server error, the so-called error 500. Consult with your hosting provider about the change, especially if you are using shared hosting.<\/span>        <\/div>\n            <\/li>\n<\/ul><ul class=\"qodef-unordered-list-item \">\n    <li>\n\t        <div class=\"qodef-ul-title-holder\">\n            <span class=\"qodef-ul-title-content\">To perform the changes described in the following sections, you have to edit files using an FTP client.<\/span>        <\/div>\n            <\/li>\n<\/ul>[vc_column_text]We will show you 4 ways to increase the memory limit.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Memory Increase<\/h3>\n<p>[\/vc_column_text][vc_column_text]The first way to increase the memory limit requires you to edit the wp-config.php file. Simply add the following line of code in the wp-config.php file.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">define( 'WP_MEMORY_LIMIT', '256M' );<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;39px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Wp-config-memory-increase-image.jpg\" class=\"attachment-full size-full\" alt=\"Wp config memory increase-image\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Wp-config-memory-increase-image.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Wp-config-memory-increase-image-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Wp-config-memory-increase-image-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]The second method for increasing memory limit is <strong>changing the memory limit value within the cPanel<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Log in to <em>cPanel<\/em>, navigate to the <em>Software<\/em> section, and click on the \u201c<em>MultiPHP INI Editor<\/em>\u201d.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php.ini-image.jpg\" class=\"attachment-full size-full\" alt=\"cPanel editing php.ini image\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php.ini-image.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php.ini-image-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php.ini-image-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Then, select your domain, search for \u201cmemory_limit\u201d and insert 256M as the value.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php.ini-image-1.jpg\" class=\"attachment-full size-full\" alt=\"cPanel editing php.ini image-1\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php.ini-image-1.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php.ini-image-1-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php.ini-image-1-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;60px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php-2.jpg\" class=\"attachment-full size-full\" alt=\"cPanel editing php\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php-2.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php-2-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/cPanel-editing-php-2-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Another way to increase the memory limit is to <strong>edit the php.ini file, which is located in the root WordPress directory<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Open the file, search for <em>memory_limit<\/em> and change the value associated with it.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If the file isn\u2019t there, create it and insert this line of code.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">memory_limit = 256M<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;18px&#8221;][vc_column_text]For some shared hosts, you have to<strong> edit the .htaccess file so the previous change can take effect<\/strong>. Make edits by adding the following code to your .htaccess file, near the top. Replace the \u201cyour_username\u201d part with your actual cPanel username.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;IfModule mod_suphp.c&gt; \r\nsuPHP_ConfigPath \/home\/your_username\/public_html\r\n&lt;\/IfModule&gt;<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;18px&#8221;][vc_column_text]The purpose of this code is to <strong>specify the directory of your php.ini file<\/strong>. With shared hosting, there are often multiple php.ini files, so you have to specify the exact location of the one you have edited or created. That\u2019s the only way to execute the correct file and code and apply changes.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-shared-host-edit-image.jpg\" class=\"attachment-full size-full\" alt=\"Htaccess shared host edit image\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-shared-host-edit-image.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-shared-host-edit-image-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-shared-host-edit-image-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Finally, <strong>you can increase the memory limit by editing the .htaccess file<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]This file is also <strong>found in the root WordPress directory<\/strong>. It is a server configuration file and usually hidden.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To access it, you should enable the relevant option(s) for showing hidden files within the FTP client of your choice. If you use FileZilla, as we do, <strong>navigate to the Server tab and click on \u201cForce showing hidden files\u201d<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Show-hidden-files-image.jpg\" class=\"attachment-full size-full\" alt=\"Show hidden files image\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Show-hidden-files-image.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Show-hidden-files-image-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Show-hidden-files-image-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Open the file, search for \u201cmemory_limit\u201d and change the value associated with it. If no code is present, insert this line.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">php_value memory_limit 256M<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;39px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-memory-limit-increase-image.jpg\" class=\"attachment-full size-full\" alt=\"Htaccess memory limit increase image\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-memory-limit-increase-image.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-memory-limit-increase-image-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-memory-limit-increase-image-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;82px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Image Editor Changes<\/h3>\n<p>[\/vc_column_text][vc_column_text]If the memory increase solution wasn\u2019t successful, you can tackle the issue by <strong>adding code that modifies WordPress image editors<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]WordPress relies on 2 image editor modules: GD Library and Imagick. They are used interchangeably. However, Imagick is known to cause memory drain, which leads to the HTTP error during image upload.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Therefore, one possible solution is to <strong>make the GD Library a default image editor<\/strong>. Simply add this code into functions.php of your theme, at the end of the file.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">function wpb_image_editor_default_to_gd( $editors ) {\r\n$gd_editor = 'WP_Image_Editor_GD';\r\n$editors = array_diff( $editors, array( $gd_editor ) );\r\narray_unshift( $editors, $gd_editor );\r\nreturn $editors;\r\n}\r\nadd_filter( 'wp_image_editors', 'wpb_image_editor_default_to_gd' );<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;18px&#8221;][vc_column_text]The code prioritizes GD Library in the list of available image editors. Whenever an image is uploaded, GD Library is always used as the first image upload option.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Functions-image-editor-code.jpg\" class=\"attachment-full size-full\" alt=\"Functions image editor code\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Functions-image-editor-code.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Functions-image-editor-code-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Functions-image-editor-code-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Let\u2019s explain why Imagick may cause issues.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Imagick uses multiple threads for more efficient image processing. However, on many shared hosts, this use is considerably restricted, leading to the HTTP error.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Another solution to the Imagick issue could be to f<strong>orce this image editor to use a single thread<\/strong> for image processing.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If you want to try that, <strong>insert this line of code into your .htaccess file<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">SetEnv MAGICK_THREAD_LIMIT 1<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;39px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-image-editor-code.jpg\" class=\"attachment-full size-full\" alt=\"Htaccess image editor code\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-image-editor-code.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-image-editor-code-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-image-editor-code-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;79px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Additional Troubleshooting Steps<\/h2>\n<p>[\/vc_column_text][vc_column_text]In most cases, the image upload problem should be solved by using one of the solutions provided in the previous sections. However,<strong> keep in mind there are many possible reasons for the error, and so far we\u2019ve included the most common ones<\/strong>. Now let\u2019s look into some of the less employed troubleshooting methods.[\/vc_column_text][vc_empty_space height=&#8221;72px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Further Modifications of the .htaccess File<\/h3>\n<p>[\/vc_column_text][vc_column_text]Sometimes, the WordPress image upload process can result in an HTTP error due to the <em>mod_security<\/em> rule set on the server. <strong><em>Mod_security<\/em> is an open-source firewall used for security purposes<\/strong>. Sometimes, it can accidentally block the image upload. By removing\/disabling it, you can solve the image upload issue.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To remove mod_security, add the following code to the top of your .htaccess file via an FTP client.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;IfModule mod_security.c&gt; \r\nSecFilterEngine Off \r\nSecFilterScanPOST Off \r\n&lt;\/IfModule&gt;<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;54px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-mod-security.jpg\" class=\"attachment-full size-full\" alt=\"Htaccess mod security\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-mod-security.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-mod-security-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-mod-security-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]If the issue isn\u2019t solved by adding code\/changing the option, revert the change, as it may cause security issues.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Also, if your server is using Authentication Access Control, you should also add this code to your .htaccess file via FTP.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># Exclude the file upload and WP CRON scripts from authentication\r\n&lt;FilesMatch \"(async-upload\\.php|wp-cron\\.php|xmlrpc\\.php)$\"&gt;\r\nSatisfy Any\r\nOrder allow,deny\r\nAllow from all\r\nDeny from none\r\n&lt;\/FilesMatch&gt;<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;39px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-access-control-modification.jpg\" class=\"attachment-full size-full\" alt=\"Htaccess access control modification\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-access-control-modification.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-access-control-modification-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Htaccess-access-control-modification-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;82px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Changing File Permissions<\/h3>\n<p>[\/vc_column_text][vc_column_text]Having incorrect <a href=\"https:\/\/wordpress.org\/support\/article\/changing-file-permissions\/\" target=\"_blank\" rel=\"noopener noreferrer\">file permissions<\/a> in your WordPress uploads folder is one of the many causes of the Image Upload error.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]For the purposes of this article, <strong>we will only focus on the uploads folder<\/strong>, as it stores all the images uploaded to WordPress. Having improper permissions on your uploads folder can cause problems with image upload as well as show the already uploaded images as blanks.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2019\/10\/Title-and-Alt-Text-2.jpg\" class=\"attachment-full size-full\" alt=\"Media Library\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2019\/10\/Title-and-Alt-Text-2.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2019\/10\/Title-and-Alt-Text-2-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2019\/10\/Title-and-Alt-Text-2-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;60px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"374\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/images-as-blanks.jpg\" class=\"attachment-full size-full\" alt=\"Images as blanks\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/images-as-blanks.jpg 700w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/images-as-blanks-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/images-as-blanks-620x331.jpg 620w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]This issue can happen <strong>after a migration from another host<\/strong>. The solution is rather simple, you only need to manually set the proper permissions on the uploads folder.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Permissions can be changed via FTP, by right-clicking on the uploads folder and selecting <em>File Attributes<\/em>. Manually insert the numeric value and check both the \u201c<em>Recurse into subdirectories<\/em>\u201d and the \u201c<em>Apply to directories only<\/em>\u201d options.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The <strong>suggested permission for directories and subdirectories is 755<\/strong>. It grants the administrator of the site all the permissions &#8211; to read, write and modify, while the rest (non-admin users) have the rights to read and modify directories.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Permissions-on-uploads-folder.jpg\" class=\"attachment-full size-full\" alt=\"Permissions on uploads folder\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Permissions-on-uploads-folder.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Permissions-on-uploads-folder-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Permissions-on-uploads-folder-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;82px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h3 class=\"qodef-h5\">Contact Hosting Provider<\/h3>\n<p>[\/vc_column_text][vc_column_text]A reminder &#8211; <strong>make sure you clear the cache and run the test after each suggested step<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]If the problem still isn\u2019t solved despite closely following our directions, it is time to contact your hosting provider. Describe the issue and the ways you tried to solve it, and ask for further assistance.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Final Thoughts<\/h2>\n<p>[\/vc_column_text][vc_column_text]Now you\u2019re ready to go back to telling thousands of new stories with each image you add to your website.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]While this guide cannot cover all the possible causes for an HTTP error, you\u2019ll most likely find the solution to your problem here. Keep this tutorial in your bookmarks, so you can quickly deal with this relatively common issue whenever it comes up. [\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Learn how to fix the image upload HTTP error in WordPress that can also occur when uploading videos, PDF, and other types of WordPress-supported media files.<\/p>\n","protected":false},"author":11229,"featured_media":5749,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[4,52,13],"class_list":["post-5673","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-tips","tag-troubleshooting","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/5673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/11229"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=5673"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/5673\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/5749"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=5673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=5673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=5673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}