Starting with version 5.6.0 of the ShortPixel Image Optimizer (SPIO) plugin, a new feature has been added: Background mode.
In short, this feature allows image optimization without the need to have one of these browser windows open. When images are added to the processing queue for optimization and none of the browser windows are open, SPIO adds cron jobs to perform the processing in the background.
It is important to note that this optimization method can be significantly slower for low-traffic websites or shared hosting, depending on the server resources allocated by the host. If you notice a significant increase in server resource usage or processing time, you should consider switching to browser-based optimization and disable Background mode.
To enable Background mode, you can either go to Settings > ShortPixel > Advanced in your WordPress dashboard and enable it from there, or you can go to Media Library > Bulk ShortPixel and start a bulk optimization process with the Background mode option enabled.
Another important aspect is the way WP-Cron works. By default, it is not the same as a server-side/system cron and is triggered on page load. In other words: If no one visits a site with Background mode enabled, most likely nothing will be optimized because the cron jobs will not be triggered. Some hosts (mostly managed WordPress hosts) disable the default WordPress cron system and enable a system cron that triggers the WP-Cron scheduler, which works more reliably. If you are faced with the situation that the Background mode does not seem to do anything, please contact your host and ask them how they handle WordPress cron events.