• Hi, I had issue with uploading photos after 3.5.1 upgrade. I had aprox 100 files on my PC, already resized to 900x600px. I wanted to create Gallery in a post, and every time (I tried manytimes) some of them failed to upload with “HTTP Error”. Different images everytime, not the same ones.

    It failed on /wp-admin/async-upload.php script, which was unable to return anything in 60 seconds and webserver returned error 504 Gateway timeout (as I saw in “Network” activity) – it appeared as a red HTTP error in Media window. An original image was uploaded, but there were no thumbnails. What? Webserver needs more than 60 second to resize image from 900px to 150px???

    I have googled countless times … there are no memory issues, no not-writeable upload dir, no mod_security on etc. Some images are proccesed, some aren’t.

    And solution? Imagick PHP library. Script freezes on line “$this->image = new Imagick( $this->file );” in wp-includes/class-wp-image-editor-imagick.php. My webhost has ImageMagick 6.6.8-5 2011-05-03 Q16 version, quite obsolete. Now I am waiting for an upgrade. PHP version is 5.3.6.

    I have forced WP to choose “old” GD library for dealing with images and for the first time I have uploaded all 107 images at once without any error.

    So, I believe irregular HTTP errors when uploading photos can be related to ImageMagick library.

Viewing 3 replies - 16 through 18 (of 18 total)
  • Marinko

    (@weberteam)

    And yet again, on another installation, mklusak solution rocks!
    Thanks man ??

    arreguisergio

    (@arreguisergio)

    Thank you very much @mklusak@!!!
    It worked for me!!!

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

    worked for me

    THANKS @mklusak You saved a lot of my time.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘HTTP Error when uploading images (but not all failing!)’ is closed to new replies.