Docs

Smush

3 min readUpdated June 28, 2026

Smush (WP Smush) by WPMU Dev compresses images and optionally serves WebP and AVIF versions. WP Media Cloud and Smush work together without conflict, including when local file removal is enabled. Smush is one of the most offload-aware image optimizers in the WordPress ecosystem and does not require local files to be present for any part of its pipeline.

How they work together#

Smush resolves attachment files through its own file helper that exposes a filter hook specifically for offload plugins to intercept. This means Smush does not assume files are on the local filesystem — it asks WordPress’s file system layer for the path and allows that layer to be overridden. WP Media Cloud does not need to do anything special to make Smush aware of offloaded files.

When Smush compresses a file, it sends the file data to the Smush API, receives the compressed result, and writes it back. WP Media Cloud re-offloads the optimized version to cloud storage automatically. The final file in your bucket is the compressed version.

WebP and AVIF delivery with local file removal#

Smush’s WebP and AVIF delivery works by capturing the page HTML output and rewriting image src values in memory. It performs a URL string substitution — it does not check whether the WebP or AVIF file exists on the local filesystem before rewriting. This means Smush WebP and AVIF serving works correctly even when local files have been removed after offloading.

This is different from Imagify, which does perform a local filesystem check before inserting WebP sources. With Smush, you can enable local file removal in WP Media Cloud and still have WebP and AVIF versions served correctly.

Configuration#

No configuration is required in either plugin. WP Media Cloud detects Smush automatically and reports its status on the Integrations tab in the plugin dashboard.

Smush processes images on upload by default. Smush Pro also offers a background CDN mode through the WPMU Dev CDN, which operates independently of WP Media Cloud’s CDN configuration. If you use the Smush Pro CDN, be aware that it rewrites URLs separately from WP Media Cloud. In most cases only one URL rewriting layer should be active at a time — use either the Smush Pro CDN or WP Media Cloud’s CDN configuration, not both.

Bulk optimization after migration#

If you run the WP Media Cloud bulk migration tool to offload your existing media library and then want to compress those files with Smush, run Smush’s bulk optimization tool after the migration completes. Smush will compress each file and WP Media Cloud will re-offload the optimized version to cloud storage automatically.

Troubleshooting#

Smush is not compressing offloaded files
Smush fetches files using its own file resolution layer which is offload-aware. If compression is failing, confirm your CDN URL is publicly accessible and that the Smush API can reach your files. Check the Smush bulk optimization log for specific error messages.

WebP or AVIF versions are not being served
Confirm that Smush Pro’s WebP or AVIF serving feature is enabled in Smush settings. Also confirm that WP Media Cloud’s URL rewriting is active under WP Media Cloud > Settings. If you are using the Smush Pro CDN alongside WP Media Cloud’s CDN, URL rewriting conflicts may prevent WebP sources from resolving correctly. Use one CDN layer at a time.

File size in the media library shows the original uncompressed size immediately after upload
Smush processes images on upload synchronously by default. If the size shown is the uncompressed size and does not update, Smush may be running in a background queue mode. Once the background job completes the optimized version is re-offloaded and the media library will show the correct size on refresh.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only