• Resolved saketsays

    (@saketsays)


    Started using Plugin earlier today and when I ran the bulk compress mode, few image files with reason “Latest error: File is empty (HTTP 400/InputMissing)”. Can you please indicate what does this mean?

    Thanks
    Saket….

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author TinyPNG

    (@tinypng)

    Hi saket,

    I’m sorry you ran into some issues compressing your images. The error message indicates that the image you tried compress could not be uploaded correctly to the API for compression.

    Could you check this image in the Media Library? Could you check if the image exists and is not missing on disk. You can also retry the compression from the List View of the Media Library.

    Dean

    (@deanbolton)

    I am experiencing the same issue. I can confirm the file exists. I have tried compressing it from the List View of the Media Library but get the same result.

    Some server details below:

    WordPress: 4.7.4
    Web Server: LiteSpeed
    PHP: 5.6.30

    I am using S3 to store media via: Amazon Web Services (v1.0.2) and WP Offload S3 (v1.4) by Delicious Brains.

    It has worked for me previously.

    Plugin Author TinyPNG

    (@tinypng)

    Hi Dean,

    Thank you for the feedback. In order to further investigate this, we would need some additional information.

    Most importantly, do you get this error for all images? Are these images that are newly added to WordPress, images that were already added to WordPress but weren’t compressed yet or both?
    You also mentioned that it worked for you previously. Do you happen to know what has changed in your WordPress setup since? Perhaps you installed other plugins, or updated WordPress/plugins. That information could also be very useful in finding out the cause.

    Dean

    (@deanbolton)

    Hi again,

    Ok, some more details:

    • The compression works fine when new media is added individually. It seems to be an issue with the bulk optimisation or optimisation after the fact.
    • That said, I did experience a random HTTP error while uploading a single image, which I haven’t been able to produce – https://www.screencast.com/t/hCpmNYLteNHt
    • If I disable the plugin, upload an image and re-enable the plugin, I don’t get the option to compress the image – https://www.screencast.com/t/HL31joeK2Vs
    • The error occurs for ALL images listed in the bulk optimisation screen.
    • I recently upgraded WordPress core and installed plugins.
    • I have, however, done the same on other sites I manage with the same plugin set and they work fine.
    • I have reached out to the hosting company to see if they can shed any light on the matter from the server side, in case there’s something there.

    It’s very unusual. I hope this information helps.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    @tinypng I’ve deleted your offer to access your user’s site. I’m am 100% sure you mean well but please never ask make that offer on these forums.

    http://codex.ww.wp.xz.cn/Forum_Welcome#The_Bad_Stuff

    Now for the why: The internet is a wonderful place full of very nice people and a few very bad ones. I’m sure everyone here is very nice however, by giving some ones keys to your house you are trusting they wont steal anything. Likewise the person who takes the keys is now responsible for the house FOREVER.

    If something was to go wrong, then you the author may well legally become liable for damages, which they would not normally have been as their software is provided without warranty.

    Please be aware that repeatedly asking for that access will result in us asking you to repeatedly stop before escalating up to the plugins team.

    Plugin Author TinyPNG

    (@tinypng)

    Hi Jan,

    Understood. We just want to help out our users, and often times it helps us identify and solve problems faster when we temporarily have access to their setup.

    Dean: Thanks for the additional information. It’s pretty odd that you’re only having this problem on this site, while other sites of yours with the same set of plugins are working fine.

    Could you perhaps give it another try with other plugins that are handling your images disabled? Just disable them temporarily and add new images to your WordPress site. We’re interested to know whether having the images stored locally in your WordPress upload folder with no other plugins touching them solves the problem for you.

    In regards to the HTTP error, that can sometimes happen when our service is under heavy load. Mostly retrying the image once more should solve that.

    Dean

    (@deanbolton)

    Hi @tinypng,

    Thanks for your offer to help.

    I have disabled ALL plugins but yours and am STILL experiencing the issue – https://www.screencast.com/t/C70UmwzYr42.

    It’s completely bizarre. I have learnt over the years that issues like this – that aren’t being reported by the masses – are generally something “special” to me. I have reached out to the hosting company but there is nothing obvious from their side in their logs.

    Side note: I recently encountered another unexpected issue with another tried-and-tested plugin only to discover that my hosting company had ramped up security rules, so things broke. Unfortunately, that is not the case in this situation.

    I will continue to debug from my end. If you think of anything, shout.

    Thanks again, Dean.

    Plugin Author TinyPNG

    (@tinypng)

    Hi Dean,

    Thank you for giving that a try. It makes it indeed looking more and more like something specific to the environment that this site runs on.

    If you have shell access to the server and a bit of technical knowledge you could try to see if you can compress images using either simple curl requests or using the Tinify PHP library on the actual server that this site runs on. You can find examples on https://tinypng.com/developers/reference and https://tinypng.com/developers/reference/php

    If both aren’t working either, then we can be sure that it’s caused by the environment and not by the plugin.

    Dean

    (@deanbolton)

    Ok, I have found a fix/workaround – I wouldn’t say I have found the problem, but alas.

    The error occurred on ANOTHER site of mine so I looked in to it further. For some reason, the additional image sizes haven’t been created for some images – only the original image is showing in the uploads folder. These are the images that are failing to compress and result in the error.

    If I use the ‘Enable Media Replace’ plugin to simply “re-upload” the image using the original file, the additional image sizes are generated and the compression tool then works.

    2017-05-31_1531

    It would appear the ‘HTTP 400/InputMissing’ is referring to the fact that the compression plugin is expecting the file resources for the additional sizes but cannot find them because they don’t exist, which leads us to the error.

    I hope this helps someone else.

    Plugin Author TinyPNG

    (@tinypng)

    Hi Dean,

    thanks for the feedback! We happy to hear that you found a fix to your problem. In any case these are very interesting findings and we’ll definitely keep your feedback in our backlog.

    Happy compressing!

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

The topic ‘Latest error: File is empty (HTTP 400/InputMissing)’ is closed to new replies.