Delayed Image Processing
Delayed image processing speeds up gallery uploads by deferring the creation of thumbnail and large preview sizes (and watermarks) to a background queue. Instead of waiting for each image to be fully processed during upload, Sunshine saves the original file immediately and generates the smaller sizes in the background later.
This is especially useful when uploading large batches of high-resolution images, where the resizing and watermarking step can make each upload take significantly longer.
How to Set It Up
- Go to Sunshine Photo Cart > Settings > Galleries.
- Under the Administration Options section, check Delay image processing.
- Save your settings.
That's it. The next time you upload images to a gallery, processing will happen in the background.
How It Works
Without delayed processing (default)
When you upload an image to a gallery, Sunshine does everything in one step: saves the file, generates the thumbnail and large preview sizes, applies your watermark, and then confirms the upload is complete. Each image must finish all of these steps before the next one starts.
With delayed processing enabled
The upload is split into two phases:
- Upload (immediate): The original file is saved and added to the gallery. This happens very quickly since no resizing or watermarking is done yet.
- Processing (background): About 10 seconds after the upload finishes, a background task picks up the queued images and generates the thumbnail and large sizes, applies watermarks, and handles any other post-upload steps. This runs automatically without any action from you.
While the background processing is running, images in your gallery will display using the full-size original. Once processing completes, the optimized thumbnail and large sizes take over. Your visitors may briefly see slightly slower-loading images if they view a gallery in the short window before processing finishes.
Important: WP-Cron Must Be Running
Delayed processing relies on WordPress's built-in scheduling system (WP-Cron). If WP-Cron is not running on your site, queued images will never be processed.
WP-Cron works automatically on most sites — it runs whenever someone visits your site. However, there are two situations where it may not work:
- WP-Cron is disabled. Some hosting providers or performance plugins disable WP-Cron and replace it with a server-level cron job. If
DISABLE_WP_CRONis set totruein yourwp-config.php, make sure you have an external cron job hittingwp-cron.phpat least once per minute. - Very low traffic sites. Since WP-Cron only runs when someone visits your site, images on a site with very few visitors may take longer to process. If this is a concern, set up a server-level cron job to trigger
wp-cron.phpevery minute.
If you're not sure whether WP-Cron is working, upload a test image with this setting enabled and check back after a minute. If the image shows a thumbnail in the gallery admin, processing is working.
Cloud Storage Compatibility
If you use the Cloud Storage addon, delayed processing works seamlessly. Images are offloaded to cloud storage after background processing completes — not during the initial upload. This ensures all sizes (thumbnail, large, and original) are uploaded to the cloud together.
Notes
- The background queue processes images one at a time, working through batches every minute until the queue is empty.
- If something interrupts processing (like a server restart), the queue picks up where it left off on the next cron run.
- Watermarks are applied during background processing, not during upload. If you're waiting for watermarked images to appear, give the background queue a minute to catch up.
Still need help?
If you have not yet found your answer in the documentation articles, please contact support