Fix WordPress Upload Image HTTP Error

I often encounter error on wordpress image uploader that return http error when I try to upload an image through wordpress default image uploader. This often happen after I migrate from my localhost to the hosting. After consult with the hosting technical team, they suggest this fix and it works.

Paste this code on your theme’s functions.php file:

add_filter( 'wp_image_editors', 'change_graphic_lib' );
function change_graphic_lib($array) {
return array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' ); 
}

If you google for the error, there are some fix available. It may vary between different hosting providers.

Leave A Comment

%d bloggers like this: