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
https://staging-website.example.com/path/to/image.jpg, 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 ShortPixel Image Optimizer.
A solution to this problem is usually to:
- Go to your WordPress dashboard, navigate to Settings > General, and there make sure the WordPress Address (URL) and Site Address (URL) are correct.
- Refresh/flush the permalinks by navigating to Settings > Permalinks and clicking the Save Changes button.
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.