Why sometimes ShortPixel cannot optimize images on staging websites?
We noticed that on some staging websites the URLs of the images in your Media Library and in your database are pointing to different URLs. For example, instead of
the images would point to
While the images can be seen when a customer navigates the website or the dashboard, the URLs for the staging website can confuse the ShortPixel Image Optimizer plugin.
A solution to this problem is usually to go to your WordPress dashboard, then Settings > General, and there make sure the WordPress Address (URL) and Site Address (URL) are correct. On some staging websites these settings are those of the live site and not of the staging website and this can lead to errors when trying to optimize the images with ShortPixel.
Another possible solution to this is to just run ShortPixel on the live site as it should work just fine.
Lastly, there is also the option to test the ShortPixel plugins on a sandbox system.