Smart Skip & Re-process
How Picture Optimizer detects already-processed images and avoids redundant work.
Overview
When you select images for processing, Picture Optimizer checks each image's processing history and automatically skips images that have already been through the selected pipeline. This saves credits and processing time.
How Detection Works
When the processing modal opens, the plugin queries each selected attachment's status from WordPress post meta:
| Meta Key | What It Indicates |
|---|---|
_image_forge_status | Overall status: processed, reverted, or empty |
_image_forge_metadata | AI analysis results (if analyzed) |
_image_forge_original_file | Backup file path (if exported/replaced) |
Based on these values, each image is classified as:
- Unprocessed — No prior processing
- Analyzed — Has AI metadata but file was not replaced
- Exported — File was replaced with a processed version
- Fully Processed — Both analyzed and exported
Skip Logic Per Mode
| Image Status | Full Pipeline | Analyze Only | Compress Only |
|---|---|---|---|
| Unprocessed | Process | Process | Process |
| Analyzed only | Process | Skip | Process |
| Exported only | Process | Process | Skip |
| Fully processed | Skip | Skip | Skip |
What You See in the Modal
Status Summary
A teal info banner appears below the pipeline options:
5 images to process, 3 already done (will be skipped)
Dynamic Credit Count
Each pipeline option shows the adjusted credit cost:
2 credits per image · 10 total (3 skipped)
The skipped count appears in amber text. Credits are only calculated for images that will actually be processed.
Button Text
The process button dynamically updates:
- Normal: Process 5 Images
- All skipped: All images already processed (button disabled)
Re-process Toggle
When any selected images are already processed, an amber toggle appears:
☐ Re-process all — include 3 already-processed images
Checking this toggle:
- Removes all skip filters
- Recalculates credits for the full batch
- Updates the button text and status summary
Technical Details
Pre-flight Check
The plugin calls the image_forge_check_status AJAX endpoint with all selected attachment IDs. The endpoint returns a batch response:
Filtering
When the user clicks Process, skipped attachment IDs are removed from the processing queue before the upload step begins. Skipped images are never uploaded, analyzed, or exported.
Reverted Images
Images with status reverted are treated as unprocessed — they will go through the full pipeline without being skipped, since their processed state has been undone.
