Back to Guides

Vyso Guides

Automatic WordPress image optimization: setup guide

Updated October 15, 2026
WordPressImage optimizationAutomation

WordPress automatic image optimization needs a defined processing workflow: accept an upload, generate the sizes the site uses, apply the chosen compression and format settings, and serve the resulting files. An automatic upload setting covers new media. Existing images need a separate batch, and background jobs need a way to keep running.

Start with one optimizer and a few test uploads. Confirm the public result before processing your whole library. A status that says "optimized" is useful, but the selected image response tells you whether visitors receive the intended version. The WordPress image optimization plugin comparison explains processing models and service limits.

Define what should happen to every upload

Write down the maximum source dimensions your templates need, the compression mode, and which generated sizes should be processed. Decide whether originals must remain available for re-editing. For a photography site, the delivery copy and downloadable master may need separate policies.

WordPress already creates registered image sizes and can scale large uploads. Those operations do not establish a complete policy for every file in the library. A small JPEG may pass through as a source without the additional compression you expected, and a theme can request a size your optimizer excludes.

WordPress 7.1 also introduces browser media processing for supported block-editor uploads, with server processing as a fallback. The browser path honors the relevant WordPress size, quality, and output-format settings. This adds another upload path to check; it does not choose a delivery policy for your site.

Choose between stored optimization and adaptive delivery

A library optimizer processes files and saves optimized versions on your site. For example, ShortPixel Image Optimizer sends selected images and thumbnails to its processing service, then saves the returned files locally. Optional backups allow restoration, and requested WebP or AVIF versions can be stored alongside them.

Adaptive delivery works at the image request layer. An integration rewrites the page's image delivery path so an external service supplies an appropriate version. ShortPixel documents this model for Autoptimize's image optimization service, which leaves the origin files unchanged.

Stored optimization can suit a site that wants compressed files to remain on its host. Adaptive delivery can suit a site whose layouts vary considerably or whose editors should not manage many local output variants. Compare the service allowance, replacement workflow, and behavior when the integration is disabled.

Configure automatic compression on upload

Configure the workflow on staging with WordPress administrator access, a connected processing account, and backups of uploads and the database. Confirm who manages scheduled jobs on the host. With ShortPixel Image Optimizer, use this setup sequence:

  1. Install the official plugin, connect its API key, and confirm that the account has an allowance for processing.

  2. Choose the compression mode using sample photographs and graphics. Keep original-file backup enabled when you need to restore or reprocess images.

  3. Select the generated image sizes that appear on public pages. Include an archive thumbnail if that thumbnail is part of your regular content.

  4. Set a resize ceiling only after checking the widest template and any zoom or download use.

  5. Enable the upload trigger and choose whether WebP or AVIF versions should be created and delivered.

  6. Configure background processing if the job must continue after an editor closes the dashboard.

ShortPixel's Optimize media on upload documentation explains that its upload trigger is enabled by default. Without Background Mode, processing requires one of its supported dashboard pages to remain open. Upload detection and unattended processing are separate settings.

If your chosen plugin exposes different controls, use the same questions: what starts the job, which files it changes, how it continues, and what makes the public page use the result. The compression settings guide covers choosing a quality setting with visual checks.

Make background processing reliable

ShortPixel's Background Mode uses cron jobs and can be enabled under Settings > ShortPixel > Processing. Its documentation notes that low traffic and shared hosting resources can slow the queue.

WordPress's default WP-Cron scheduler checks scheduled work on page loads. A quiet site can leave work waiting longer than expected. A host-managed scheduler can trigger WordPress jobs regularly; WordPress documents connecting WP-Cron to a system scheduler.

Ask your host which scheduling method is already configured before changing it. If page-load triggering is disabled, confirm that the replacement scheduler runs successfully. Follow the optimizer's instructions for its own queue system.

With WP-CLI installed and shell access, run these read-only checks from the WordPress installation directory:

wp --info
wp core version
wp cron event list --fields=hook,next_run_gmt,next_run_relative,recurrence

The cron event list command shows scheduled hooks and their next run. Use the plugin's documentation to identify its jobs. A listed event confirms scheduling; confirm execution separately by checking the queue and completed files.

Record queue length and failed-image messages during an initial batch. If processing repeatedly stalls, check the account allowance, connection failures, and job execution before increasing batch size. A repeated timeout needs a diagnosis; more simultaneous work can make it harder to complete.

Test the upload paths your contributors actually use

Upload a photograph through the post editor, then through Media > Add New. If the site also accepts product imports, form submissions, or API uploads, test those paths individually. A file copied directly into the uploads directory is not necessarily a registered attachment with generated metadata.

Choose samples that reveal different failures: a large landscape photo, a portrait, a transparent graphic, and a screenshot with small text. Include WebP or AVIF if editors upload them. Check each attachment's processing status after the queue has had time to run.

On a public test page, use the image element's currentSrc property to identify the selected resource at a mobile width and at the widest desktop layout. In the Network panel, compare transferred bytes and Content-Type. Scroll to lower images to verify deferred loading. Open a product zoom or lightbox if the attachment is used there.

Restore one optimized sample from backup. Confirm that the attachment still renders and that you can reapply the intended setting. A restoration check is easier to interpret before thousands of files have been processed.

Process existing media as a separate migration

Automatic upload processing applies to new media. It does not prove the older library is complete. Use the optimizer's bulk screen to scan existing attachments and review the number of originals and generated sizes it will process.

Back up the database and upload files together, then run a small batch. Check whether the estimated usage includes thumbnails, format conversion, or additional folders. Avoid launching another full optimization pass after a theme regenerates sizes until you know which files genuinely need processing.

If WebP or AVIF files were created but the page still uses JPEG, check delivery configuration and cached HTML. A file can exist on disk without appearing in the page's image candidates. Keep one component responsible for modern-format delivery so its behavior is traceable. The WordPress image CDN guide explains URL rewriting and cache checks.

Keep a small maintenance record

Save the chosen settings, the date of the initial bulk pass, and a few representative attachment IDs. Include the scheduler method and the location of original backups. This gives the next editor a way to distinguish an incomplete queue from a deliberate exclusion.

After a theme or page-builder change, repeat the upload and public-page checks. New sizes and background-image output can bypass an old configuration. Before a large import, confirm the available quota and pause competing bulk jobs if they use the same account or hosting resources.

If a page remains slow after automation works, inspect its actual requests. A full-size background, late hero-image discovery, or a slow HTML response needs its own fix. Automation keeps a chosen workflow running; the broader optimization workflow helps identify which part of that workflow needs adjustment.

Apply delivery rules to assets in a shared library

Once your images are stored in Vyso, its CDN delivery can apply chosen resize, quality, and format settings when a representation is requested. Reusing the delivery URL allows cached variants to be served again while the original remains available. A WordPress template or integration must use those URLs; upload triggers and scheduled jobs still need their own configuration. Vyso is also developing a WordPress image plugin to connect WordPress publishing workflows with its media library; it is not available to install yet.

Keep going

Make the media library less work.

See how Vyso brings search, enrichment, cleanup, and delivery into one product.

Start free