• Resolved ctyldsley

    (@ctyldsley)


    Hi there,

    With the latest version of Compress PNG for WP + WordPress 4.0 we’ve started seeing an issue over the past few days on multiple sites hosted by different companies where after uploading images they’ll become broken. Disabling Compress PNG solves this, which suggests the issue is with Compress PNG. Basically the images upload, and appear to compress, but they are then broken.

    See here for example – http://squashtravel.co.uk/wp-content/uploads/2014/11/MelandClient.png

    The image file exists, but when downloaded to my computer via FTP and I try to open it I get “Windows photo viewer can’t open this picture because the file appears to be damaged, corrupted or is too large”

    https://ww.wp.xz.cn/plugins/compress-png-for-wp/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I had a similar problem with WordPress 4.0.1, the images seem to upload but then returned a file with a size of 0 bytes. Tried to solve it and found the code broke on the line that read:

    $url_str = $header_array[3];

    After changing it to read “5” the compression worked again.

    $url_str = $header_array[5];

    Thread Starter ctyldsley

    (@ctyldsley)

    Just tried that value but still seem to have the same problem.

    Plugin Author geckodesigns

    (@geckodesigns)

    Hi,

    Sorry about that, you are correct a recent update to TinyPNG’s api was causing this plugin to overwrite uploaded images with corrupted 0 size ‘compressed’ versions of the image.

    We have released a new version (1.3) of the plugin that fixes this issue and adds support for JPEG compression as well.

    So updating the plugin should fix this issue for you, But any previously corrupted images will have to be re-uploaded and compressed again.

    I had solved this problem by a method introduced here, and after changing code the compression worked again.

    But after update version 1.3.3, it did not work again…

    Both png and jpeg images become broken 0 bytes.

    I use WordPress 4.0.1.

    $url_str = $header_array[3];

    After changing it to read “5” the compression worked again.

    $url_str = $header_array[5];

    where do i change this?

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Broken Images After Uploading’ is closed to new replies.