How to schedule Optimization
Robin Image Optimizer can automatically optimize images on a schedule so you don't need to trigger bulk optimization manually.
In this article
Overview
This article explains how to schedule image optimization using the Robin Image Optimizer plugin so images are optimized automatically in the background.
What scheduled optimization does
When you start a scheduled bulk run, Robin Image Optimizer processes the images in its queue in batches at the configured intervals. The run ends when the queue is empty; it does not keep checking for images uploaded afterward. To optimize new uploads automatically, enable Auto optimization on upload.
Automatically optimize new uploads
To automatically optimize new uploads:
- Go to Robin Image Optimizer > Settings.
- Enable Auto optimization on upload
- Click Save Changes.
Once enabled, every newly uploaded image is queued for optimization. This setting processes new uploads; it does not start a scheduled bulk run for images already in your Media Library.
Automatic processing of new uploads depends on WordPress's built-in task scheduler (WP-Cron). If uploaded images are not being processed, see the troubleshooting guidance for background optimization and WP-Cron.
Optimize existing images gradually
For images already in the Media Library:
- Go to Robin Image Optimizer > Optimize
- Start optimization from the dashboard
- Leave the process running or allow it to continue in scheduled batches
After a scheduled run finishes, start another run from Robin Image Optimizer > Optimize to process images added since the earlier run.
The plugin uses WordPress cron to process images in the background.
Schedule NextGEN Gallery optimization
When the NextGEN Gallery plugin is active, Robin Image Optimizer provides a NextGen Gallery screen. Start optimization from that screen; remaining gallery images are processed in scheduled batches through WP-Cron.


Important notes
- Scheduled optimization relies on WordPress cron (WP-Cron), triggered by site traffic or a system cron job configured by your host
- Low traffic sites may process images more slowly if they rely on visits to trigger WP-Cron
- Optimization runs in small batches to avoid server overload
Troubleshooting
If scheduled optimization is not running:
- Make sure WP-Cron events run, either through visits to your site or a system cron job
- Check if a caching or security plugin is blocking cron requests
- Trigger cron manually by visiting your site homepage — this only helps when WordPress's built-in cron spawning is active
When manual optimization works but background optimization does not
If manual optimization works but automatic processing does not, check both WP-Cron execution and the site's HTTP loopback requests — requests the server sends to its own domain. Scheduled optimization uses WP-Cron and is available in the free plugin. The Pro Background optimization type sends work through wp-admin/admin-ajax.php, with WP-Cron health checks to restart a stalled queue. Robin tests this background loopback separately from WP-Cron.
A running WP-Cron health check can process queued background batches directly, even when the background HTTP loopback is blocked. If WP-Cron does not run either, ask your host to configure a system runner rather than relying on visits to restart the queue. A system cron job runs tasks at regular intervals without waiting for visitors. Setting DISABLE_WP_CRON in wp-config.php disables traffic-triggered WP-Cron, but scheduled processing can still work when a system cron job executes WordPress events.
If your host supports WP-CLI, the command-line tool for WordPress, ask them to run this command periodically from your WordPress installation directory:
wp robin queue runThe command processes waiting background queues and any saved scheduled run in the current process, without an HTTP loopback. Retry delays and server backoff (a wait requested by the optimization server) still apply. A response indicating work is left is not necessarily a failure; some work may be waiting until it can be retried. See the background optimization and WP-Cron error guidance for related diagnostic messages.
Check Site Health for loopback errors
- Go to Tools > Site Health in your WordPress dashboard.
- Open the Status tab and look for failed tests.
- If you see a loopback request failure, an internal HTTP request failed. Ask your host to check the affected endpoint; this does not mean every loopback request is blocked.
- Ask your host to check loopback access to
wp-admin/admin-ajax.phpfor background dispatch andwp-cron.phpwhen using traffic-triggered cron. If HTTP loopbacks cannot be allowed, arrange a system cron job that executes WordPress events directly, or use the in-process queue runner above.
Check firewall and security plugin settings
Firewalls, web application firewalls (WAFs), and security plugins can block background dispatch or traffic-triggered WP-Cron requests:
- Ask your host to check firewall or server-level WAF rules blocking requests to
wp-admin/admin-ajax.phporwp-cron.php - Check security plugins such as Wordfence for bot-protection or firewall rules that restrict cron or loopback traffic
- If you use Cloudflare or another CDN, check that bot-protection settings are not blocking requests to
wp-admin/admin-ajax.phporwp-cron.php
This ensures images are optimized steadily without impacting site performance.
