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): Shortly 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.
What people see while processing runs
An image is not shown to anyone until it has finished processing. In its place you get a plain placeholder, sized to match the real photo so the gallery layout does not jump around when the photo appears.
In the gallery admin those images are labelled Processing so you can see exactly what is still being worked on. If an image could not be processed at all, it is labelled Processing failed instead, so a stuck photo is easy to tell apart from one that is simply waiting its turn.
This matters for more than tidiness. Before Sunshine 3.7.1, an image with no thumbnails yet fell back to the full-resolution original, so a client opening a gallery mid-upload was handed your untouched, unwatermarked files. The placeholder means that can no longer happen.
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.
For step-by-step instructions on setting up a server cron, through your host or a free external service, see Setting Up a Reliable Server Cron.
You do not have to work this out on your own. If images are waiting to be processed and nothing is scheduled to process them, Sunshine shows a warning in the admin telling you so, which almost always means WP-Cron has stopped running.
Sunshine Photo Cart > System Information also reports how many images are waiting, whether the queue is currently running, and when it next runs. That is the quickest way to check on a site you are not sure about.
If you want to test it yourself, upload an image with this setting enabled and check back after a minute. If the image has lost its Processing label in the gallery admin, the queue 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 works continuously until it is empty, rather than running for a few seconds out of each minute. Since Sunshine 3.7.1 this makes large uploads finish in roughly a third of the time they used to take.
- 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