"Invalid image or unsupported image format", what is this?
The error message "Invalid image or unsupported image format" can be sometimes puzzling, especially when the actual image exists and looks good when viewed in a browser.
Here are some of the usual reasons for this and possible solutions:
- Images that actually have errors or simply don't exist in the server. To confirm this: open the specific image on an Incognito/Private window and check if you can see them. A possible solution is to use a plugin like Enable Media Replace to re-upload and replace the images that are broken.
- Sometimes the images are not actually images. If that's the case, the website returns an HTML file with HTTP code 200 (which means "everything OK") but ShortPixel will fail to optimize. Here you can check if your image has some problem: https://checkfiletype.com/
- Unsupported image formats (e.g. .svg). Remember that ShortPixel Image Optimizer can only optimized JPG, PNG, GIF and PDF files.
- You're using a security plugin that has an option that prevents the images from being properly accessed (e.g. "Long URL strings" option in the iThemes Security plugin). Try to deactivate any security plugin you may have and then try again.
If the above did not help, please have a look at Why some of the images and/or thumbnails cannot be optimized?
If the error is happening for all your images, please have a look at the following article and make sure all is in order: None of my images were optimized, why is that?