The nexter/bulk-optimize-images ability compresses images in your WordPress Media Library using your configured Nexter Image Optimization settings. You can target specific attachment IDs or let it process the next batch of unoptimized images automatically. This has the same effect as clicking Start Bulk Optimisation on Media > Bulk Images. Keep batch sizes small to avoid PHP timeouts.
Key Takeaways
Required Setup
The Image Optimization extension must be enabled in Nexter Extension settings. Call nexter/get-bulk-image-optimizer-status first to confirm unoptimized images exist. Use nexter/get-image-optimization to review your current compression settings before running.
Parameters
Both parameters are optional. If you omit both, the ability processes the next 5 unoptimized images from your Media Library.
What It Returns
The ability returns a result object for each processed image in the batch.











