Skip to content
WP Cloud
WP Cloud
    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management
    • PanelAlpha Integration: White-Label WordPress Control Panel for Hosts
    • EasyEngine Panel Integration: Visual WordPress Management for WP Cloud
    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
    • Pressable
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Impressive Hosting
    • Blog
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗
  • Solutions

    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Featured Partners

    Features

    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management

    Integrations

    • PanelAlpha Integration
    • Easy Engine Panel Integration

    Resources

    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
  • Case Studies
    • PressableA case study about how WP Cloud supports Pressable to power millions of page views daily.
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Newspack
    • Inverse Paradox
  • Insights
    • Podcast
    • BlogWP Cloud blog page with latest news and updates about the platform.
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗

Browse

    • WP Cloud platform overview
    • Onboard and launch with WP Cloud
    • WP Cloud Partner Portal
    • Get support from WP Cloud
    • WP Cloud glossary
    • Manage and secure API keys
    • Client SSH
    • WP Cloud API quick start
    • Webhooks
    • Run bulk tasks across sites
      • Manage site domains and aliases
      • Domain verification records
      • TLS certificates
      • Manage custom TLS certificates
      • Cloudflare and WP Cloud
    • Clone a site
    • Configure resources, site type, and billing with site meta
    • Delete a site
    • Persistent data
    • Staging sites
    • Migrate a site to WP Cloud
      • SSH and SFTP access models
      • Client SSH
      • User SSH and SFTP access
      • Database credentials
      • phpMyAdmin
      • ABSPATH
      • Default wp-config.php
      • Site constants
      • Configure redirects and headers with custom-redirects.php
      • Akismet and Jetpack
      • Blocked and unsupported plugins
      • PHP lifecycle and supported versions
      • Symlinks and managed software
      • WordPress versions
      • Install Composer and WP-CLI packages
      • Manage platform software with WP-CLI
      • Useful WP-CLI commands
    • Transactional email
    • WordPress multisite
    • Cron scheduling
    • Decoupled and headless WordPress
    • Repair Yoast indexables
      • Page Cache
      • Edge Cache
      • Object Cache
      • Image transformation
      • Offload image sub-sizes
    • Configure lightweight 404s for static files
      • DDoS protection
      • Defensive Mode
      • Rate limiting
      • Network and web application firewalls
      • Bot protection
      • Password protection
      • HTTP and security headers
      • PHP filesystem access permissions
      • Scan a site for malware
    • Backups overview
    • Create an on-demand backup
    • Restore a backup
    • Jetpack backups
      • Error logs
      • Web server logs
    • Metrics
    • Application performance monitoring
    • Automated failover
    • IP ranges
    • Origin and edge servers
    • Server specifications and settings
    • EasyEngine integration
    • PanelAlpha integration
      • White labelling and co-marketing WP Cloud
      • WP Cloud logos
      • Terms of Service & Compliance
      • Prohibited content
      • Copyright infringement and takedown notifications
    • WP Cloud billing
    • WP Cloud for agencies and site networks
    • WP Cloud partner support options
    • Troubleshoot Page and Edge Cache
    • Troubleshoot HTTP 429 and 599 errors
    • WP Cloud HTTP status codes
    • Troubleshoot site performance
    • Cache slow database queries
    • Troubleshoot duplicate core files, wp-config.php, and wp-admin 403 errors
    • Troubleshoot email delivery
    • Troubleshoot PDF thumbnail generation
    • Troubleshoot TLS certificate provisioning
Documentation/Performance/Image optimization/Offload image sub-sizes

Offload image sub-sizes

LAST UPDATED

3 months ago

    WordPress normally creates several intermediate image files for every upload. WP Cloud’s Intermediate Image Offloading feature, also called Photon Subsizes, stores the attachment metadata without writing each generated size to the site’s filesystem. A requested size is produced from the original image and served through the image service instead.

    This can substantially reduce filesystem use on image-heavy sites while retaining the responsive image sizes that WordPress themes and browsers expect.

    Enable or disable the feature

    Set the photon_subsizes value with the Site Meta endpoint:

    • 1 enables Intermediate Image Offloading.
    • 0 disables it.

    A plugin or theme can override the site-meta value with the photon_subsizes_enable filter:

    add_filter( 'photon_subsizes_enable', '__return_true' );Code language: JavaScript (javascript)

    The PHOTON_SUBSIZES constant has the highest priority. A truthy value enables the feature and a falsy value disables it, regardless of site meta or filters:

    define( 'PHOTON_SUBSIZES', false );Code language: JavaScript (javascript)

    Use one control at a time when possible so the active behavior is clear to the host partner’s support and developer teams.

    Remove existing intermediate files

    Enabling the feature does not delete files that WordPress already generated. Test the cleanup on a staging copy before applying it to a production media library. Begin with the dry run:

    wp atomic photon-subsizes-recover-space --dry-run

    Review the reported files and space, then run the command without --dry-run to remove eligible intermediate images:

    wp atomic photon-subsizes-recover-space

    Keep the original uploads. The service needs an original image to produce a requested intermediate size.

    Limitations

    • The feature cannot be used with the WP Cloud wp_uploads privacy model. The image service must be able to request the public original.
    • While enabled, it is not compatible with wp media regenerate or the Regenerate Thumbnails plugin’s regeneration workflow because the intermediate files are intentionally absent. Thumbnail cleanup can still work.
    • After disabling the feature, wp media regenerate may be needed to recreate intermediate files on the site.

    How requests are served

    The platform mu-plugin extends the selected WordPress image editor. Its make_subsize() and multi_resize() behavior records subsize metadata without creating the corresponding files.

    At the web-server layer, a request is eligible when its filename follows the normal name-WIDTHxHEIGHT.ext pattern and the matching original exists in the same uploads path. For example, pine-forest-300x200.png can be generated from pine-forest.png; a missing original cannot be reconstructed.

    When a browser requests a filename such as:

    https://example.com/wp-content/uploads/2020/07/desert-flora-200x200.jpegCode language: JavaScript (javascript)

    and the original desert-flora.jpeg exists, the web server sends the missing size to the image service. The internal image-service URL includes the original file’s last-modified time:

    https://i0.wp.com/example.com/1594944825/wp-content/uploads/2020/07/desert-flora.jpeg?w=200&h=200&ssl=1Code language: JavaScript (javascript)

    WP Cloud removes the embedded time when retrieving the original. When the original changes, its modification time changes too, producing a new cache key for the transformed image.

    The image service caches its result by URI for an unlimited period. Including the modification time in the internal URI is therefore the cache-busting mechanism: the service sees a new URI after the original changes, retrieves the latest source image, and caches the newly resized response.

    Jetpack Site Accelerator can also rewrite frontend image URLs directly to the image service, but those URLs do not include WP Cloud’s modification-time cache busting. Jetpack Site Accelerator is not required for WP Cloud image transformation.

    Previous Image transformation
    Next Configure lightweight 404s for static files

    Related Guides

    • Image transformation

      Resize, crop, and transform uploaded images through WP Cloud’s edge network without storing each variation.

      2 Min.

      READ

    On this page

      Contact support

      Contact us with Support issues and questions related to WP Cloud, the WP Cloud Atomic API, API-key IP allow list changes, Station, and more.

      Check the FAQs

      Have questions? Please visit our FAQ to learn more.

      An Automattic venture

      Work With Us

      Press

      Privacy Policy

      © 2021-2026 Automattic Inc.

      Notifications