Skip to content

[00] Subset Sizes, User guide

EWWW Image Optimizer

Last updated

How Subset Sizes queues sizes it makes on demand with EWWW Image Optimizer, the EWWW override that stops it, and the limits.

Subset Sizes works with EWWW Image Optimizer with nothing to set up on the Subset side. EWWW compresses images at upload. When Subset Sizes later makes a size a page asks for, it adds the image to EWWW’s background queue, and EWWW compresses the new file.

What works

  • The image is queued with EWWW. Subset Sizes calls EWWW’s own function for adding an image to its background queue. Subset Sizes queues the whole image, and EWWW decides which of its files still need compressing.
  • One hand-over per image. All the sizes one page view creates for an image are queued together at the end of the request. A bulk run queues them every 20 images.
  • EWWW errors stay in EWWW. If queuing fails, the image is still served.

What needs a setting

EWWW’s automatic optimisation has to be on. If it’s been turned off with the EWWW_IMAGE_OPTIMIZER_NOAUTO override in wp-config.php (EWWW’s override options (opens in a new tab)), Subset Sizes queues nothing. New sizes then wait for EWWW’s bulk optimiser or its scheduled optimisation, the same as uploads do.

Known limits

  • The first visitor gets the uncompressed file. EWWW compresses from its background queue after the request ends.
  • EWWW must be active on the request that makes the size. Subset Sizes checks for EWWW’s queue function and queues nothing when it’s missing.