Support » Fixing WordPress » PNG uploads cause HTTP error, JPGs do not

  • Hey,

    PNG uploads fail and show an “http error” message. The file DOES turn up in Uploads, but no thumbnails or other sizes are created. You can view it in Media, but it has no thumbnail. It’s just a URL.

    Only PNGs do this. JPGs? Fine.

    I have:
    Turned off all plugins.
    Switched Theme to 2016.
    Verified that the image is less that 1MB and only 400px x 600px.
    Verified that php memory limit is 128mb.
    Opened the image in Photoshop, verified it’s RBG, saved it as a new file, tried uploading the new one.
    Resaved the file as a JPG. That uploaded fine.
    Offered Rumplestiltskin my first-born child. He said no.

    I’m seen this in the forums before, with no answer. I’m stumped. Just changing everything to JPG is not an option in this case, I NEED to be able to upload PNGs.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter ChrisLowrance


    Oh, and I’m using the latest’n’greatest version of WordPress.

    I’m having the same issue! Relieved to discover that at least JPEGs will upload, but I always use PNG. Hoping a resolution is discovered!

    Thread Starter ChrisLowrance


    UPDATE: In Chrome’s console, I see the following error after trying to upload a PNG:

    POST http:/clientsite/wp-admin/async-upload.php net::ERR_EMPTY_RESPONSE

    XHR failed loading: POST “”.

    Going off this, I’ve now tried:
    1. Added SetEnv MAGICK_THREAD_LIMIT 1 to .htaccess.
    2. Added…

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

    … to my theme’s functions.php.
    3. Screaming at it.
    4. Added…

    # Exclude the file upload and WP CRON scripts from authentication
    <FilesMatch "(async-upload\.php|wp-cron\.php|xmlrpc\.php)$">
        Satisfy Any
        Order allow,deny
        Allow from all
        Deny from none

    … to .htaccess.
    5. Made sure PHP version is higher than 5.2 (it’s 5.4.41).
    6. Reinstalled WordPress.

    Nothing has worked thus far.

    Again, this ONLY AFFECTS PNGS. JPGs are fine.

    Since the images do technically upload, the true problem is that image sizes are not created.

    Same issue, please help

    Hi, I have just updated to 4.9 and am having this exact issue. JPEGs are fine, PNGs display as blank in media and in posts. Going to the URL of the uploaded file gives ‘ERR_EMPTY_RESPONSE’ in Chrome. I can see on the server that the file is actually uploaded however. Please let me know if you need any more info. Cheers, Rick

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PNG uploads cause HTTP error, JPGs do not’ is closed to new replies.