Support » Fixing WordPress » http error on image upload

  • Resolved Dave


    When trying to upload images to the media library an unspecified ‘http error’ appears, and an empty image thumbnail shows up. The image can be edited and opening the image path, shows the fully uploaded image.

    PHP Version 5.5
    max_execution_time 30
    memory_limit 256M

    To correct this ‘http error’ I’ve added the following line to the top of my .htaccess file:


    This fixes the problem in my case.

    • This topic was modified 2 years, 6 months ago by  Dave.
Viewing 5 replies - 1 through 5 (of 5 total)
  • This doesn’t always solve the problem. Another possible solution might be to add the following code to functions.php:

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



    This solution solves the HTTP-issue for me, but instead it causes a problem with the thumbnails on my site.
    See this image, the thumbnail of the post “Gemenskap genom tid och rum” is uploaded after I added the code to functions.php:

    Any ideas of how to solve this?

    / Isak

    I see what you mean. Could it be that the final image has a different aspect ratio?

    Before I added the code to functions.php the layout theme showed all images in the same aspect ratio, regardless of what the original aspect ratio of the image was (like the three other pictures in the image I linked to in my previous post). Now that I’ve added the code på functions.php the theme seems to show the pictures in the original aspect ratio.

    I’ve tried to regenerate my thumbnails, but then all pictures gets their original aspect ratios… The page also seems to be very heavy to load, just like the pictures is all shown in their original size but fitted into the space the theme gives theme.

    OK, so with Imagick switched off your thumbnails aren’t being generated properly anymore. This could be specific to your theme.

    This is currently a know bug in WordPress and I see you’re following the discussion here So I propose to follow along there. Make sure you give enough info there such as your server setup so that you can receive help with this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘http error on image upload’ is closed to new replies.