Smush stopping at the 5th image

I ran smush and it smushed around 700 out of 15K, until I realized that it got stuck, when I refreshed the page to run a new scan, it seems to be stopping at the 5th image now.
And it shows this error :
'invalid file format. Only PNG, JPEG, and GIF files are supported.'

  • Adam Czajczyk
    • Support Gorilla

    Hello Sam

    I hope you're well today and thank you for your question!

    I can see that smushing now stops after five images, reporting all five that it already went through as invalid. I checked these specific images it reports and they actually do seem invalid: the media library doesn't show any preview for them, Chrome browser shows just a "white square on black background" and Firefox says that it cannot load them because they contain errors.

    An example image would be this (it's a link to Media Library, just replace YOUR_DOMAIN_HERE with your actual domain name):


    If you look through the Media Library there's also quite a lot of images (easiest to find if you start checking form the last page of the list there) that actually don't even exist: there's an info about image in the database - that's why they are listed in Media Library - but there seems to be no related image file.

    Most of these images are unattached, meaning that they are most likely not used in any posts but I can't say that for sure as there are also other ways to include posts in content (some plugin might be using them or they might be linked directly). Those images were not even yet processed by Smush so it's not Smush that caused that but I'm wondering whether you noticed that before.

    Also, did you remove any images from the server physically (e.g. via FTP)? Were you using any image editing/optimization plugins other than Smush on the same site before? Was the site somehow migrated (or the images exported/imported) somehow from other site or location?

    Let me know, please.

    Best regards,

  • Predrag Dubajic
    • Support

    Hi Sam,

    Since your images completely missing, meaning there's no full-size image that could be used to regenerate your thumbnails, you will need to resolve those missing images, either remove them or if you have those original images somewhere, upload them via FTP to their correct location.

    This plugin should help you to find the broken images in your library:
    In plugin settings disable "Regenerate attachments metadata and thumbnails" option and select "Write a note to log" or "Delete" for Unreferenced Thumbnails depending if you want to delete them or track the ones with issues.
    After you have list of your broken images you can upload the original ones to the correct location and after that you will be able to regenerate thumbnails out of them, or you can delete them and if you still need some of those upload them again.

    Please note that the above plugin is not one of our products and I'm not fully familiar with it so I would suggest having a backup ready before doing any cleanup, just to stay on the safe side.

    Best regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.