Mitech Preloader
WordPress

Fix the HTTP Error When Uploading Images to WordPress

Many people encountered this HTTP error when uploading images to WordPress. The last time this happened to us was several days ago, after the hosting transfer, so I thought to share with you several solutions that may help you solve this problem.

This error appears after the image is struggling to upload for a while. Sometimes, the image is uploaded even if the error appears. Most of the time it’s the image’s size (height and width) that causes this, so trying to upload big images could trigger the issue.

Now let’s get to our solutions:

1. Decrease the image’s size.

2. Change the image’s extension from .png to .jpg, or vice versa, then upload it again.

3. If the problem appears after installing a plugin, deactivate it and try it again. Some plugins can trigger the error.

4. Increase your PHP memory. Add this code define('WP_MEMORY_LIMIT', '64M') into your wp-config.php file.

5. Add this code in .htaccess:

[php]
<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

[/php]

6. Add this code in functions.php file:

[php]

add_filter( ‘wp_image_editors’, ‘change_graphic_lib’ );

function change_graphic_lib($array) {
return array( ‘WP_Image_Editor_GD’, ‘WP_Image_Editor_Imagick’ );
}

[/php]

Hope the post helped you out! Don’t forget to share!

blank