View Categories

Why some or all of the images cannot be optimized?

Due to the nearly infinite combinations of different servers, configurations, websites, plugins, etc., it can sometimes be difficult to pinpoint the exact cause of a problem. Fortunately, ShortPixel provides various warning messages to alert you. So, first, you should look for these error messages.

Where can you see the error messages? #

Bulk optimization errors #

You will find the number of errors after each bulk optimization on the Bulk ShortPixel screen:

To learn more about these errors, click on the number link under the Errors column. There, you will see all the errors, such as:

Single optimization errors #

If you optimize a single image from the Media Library (you need to be in List view to do this), the error message will appear in the same Media Library. Example:

Causes #

  • Your website uses a firewall or security feature that denies our Image Optimization Cloud access to your website’s images. Make sure to whitelist our IPs in your security plugins, firewalls, hosting, and/or CDN. There are situations when whitelisting IPs alone is not enough, as some hosting services block the ports we need to access your images. We also recommend contacting your host and asking them to allow api.shortpixel.com access to port 80 (HTTP) and port 443 (HTTPS).
  • If your server has insufficient resources (which is common with shared hosting providers such as Bluehost, Hostgator, GoDaddy or SiteGround), you may experience a slowdown or, in some cases, the images may not be optimized at all. Try stopping the optimization and attempting it again in a few minutes. For more information, click here..
  • The images (or their thumbnails) are listed in the Media Library (or database) but no longer exist on disk. A quick solution to this problem is to use a plugin like Enable Media Replace to replace the missing images with new ones. ShortPixel should then automatically detect the new image and optimize it along with the thumbnails.
  • Some of the thumbnails are not publicly available or do not exist. To check this, open your Optimization Report (here’s how to interpret the Optimization Report) and look for files that ShortPixel could not download. In the Details column, you will see if there was a problem. A possible solution is to use reGenerate Thumbnails Advanced to regenerate your thumbnails.
  • Sometimes, the images are not actual images at all. In this case, the website returns an HTML file with HTTP code 200 (which means “all OK”), but ShortPixel cannot perform the optimization. You can check if your image has a problem here: https://checkfiletype.com/
  • Sometimes, a file has been deleted incorrectly or by mistake, so ShortPixel tries to optimize it even though it no longer exists. Please clean your database with a database cleaner and then try again.
  • You are trying to optimize images on a localhost installation. Currently, ShortPixel Image Optimizer does not work on such websites. For more information, click here.
  • Your images have an SSL problem, even though they can be viewed in a browser. If you have access to a terminal, please enter the command curl -I https://your_domain.com/wp-content/uploads/your_image.jpg, and you may see something similar to the example below. If this is the case, please contact your hosting or CDN provider so they can help you resolve the issue:
  • Some plugins add lines to the .htaccess file, which prevents our servers from accessing your website’s images. You can easily test if this is the case by temporarily renaming your .htaccess file to .htaccess_test and checking if ShortPixel Image Optimizer starts working.
  • You have several restrictive security rules set up on Cloudflare. Make sure to whitelist our IPs and check that there are no country-specific restrictions for Germany (where our servers are located). Here is a guide to potential Cloudflare issues and how to fix them.
  • Your website is in “I’m Under Attack” mode on Cloudflare. Please make sure to disable it (when you are not under attack) and try again. Here is a guide to potential Cloudflare issues and how to fix them.
  • Your website is password protected. If your website (frontend) is not publicly accessible and visitors need a username and password to connect to it, go to your WordPress dashboard, then navigate to Settings > ShortPixel > Integrations, and paste the credentials in the “HTTP AUTH credentials” fields.
  • Hotlink protection is enabled (e.g. via Plesk), and your website does not allow our servers to access the images directly.
  • The WP Hide plugin is installed and is rewriting the URLs of our ShortPixel Image Optimizer plugin, preventing it from compressing the images. You can either deactivate the plugin or try removing the ShortPixel-related rules from its settings.
  • One of your active plugins is conflicting with ShortPixel. Try deactivating all your plugins (except ShortPixel) and see if that resolves the issue.
  • Sometimes a new theme can conflict with ShortPixel. You may want to temporarily revert to an older/default WordPress theme and see if that makes a difference.
  • Incorrect WordPress settings. Please check if the URL of your website is set correctly under Settings > General.
  • Incorrect file or folder permissions. Please contact your hosting provider to ensure you have the correct file and folder permissions. For more information, click here.
  • Incorrect file or folder owner and/or group. Please contact your hosting provider to ensure you have the correct file and folder owner and group.
  • Insufficient disk space. If your server does not have enough disk space during optimization, you may experience various issues. Please contact your hosting provider to ensure that you have sufficient available disk space.
  • Your website has been recently migrated to another hosting provider, which may have caused one of the problems mentioned above. For more information, click here.
  • Your website was recently migrated to another hosting provider, and you have a custom uploads folder (using, for example, this plugin). This may cause connection errors with ShortPixel. If this is the case and you are using a custom uploads folder, you will need to either update it in the settings of the plugin you are using or check if a custom path is defined under Settings > Media. If there is a custom path there, you simply need to remove it, and WordPress will revert to the default path. Alternatively, you can restore the default path by adding the following to your wp-config.php file: define( 'UPLOADS', 'wp-content/uploads' );
  • Your WordPress Address and Site Address (Settings > General) are set to HTTP (and not HTTPS). Our plugin creates the paths of the files it needs from these settings, and because the actual site is served over HTTPS, there is a conflict/error when trying to load the plugin’s JS files from HTTP.
  • You are using Ezoic, which has decided to convert all the images on their clients’ sites to WebP format, but continues to serve them via the original URL (JPG, PNG, etc.). While this ensures compatibility with modern browsers, it may also prevent users with outdated browsers from viewing the images on your website, as their browsers don’t support WebP. On the other hand, our plugin encounters an error when trying to optimize your images, because it downloads a WebP file with a JPG extension instead of the actual JPG file. Please contact Ezoic and request that they disable this automatic conversion so that our plugin works properly. Otherwise, the plugin will continue to produce these errors. For an example of a customer with this issue, click here.

You can also try searching our knowledge base for the exact error: ShortPixel Knowledge Base