
Defyn Media Offload moves your WordPress media library to S3-compatible object storage and serves every image, video and document from a fast content delivery network (CDN), then optionally deletes the local copies so your site fits within strict host disk and storage limits.
It works with Amazon S3, DigitalOcean Spaces, Cloudflare R2, Wasabi, Backblaze B2, Google Cloud Storage (in S3 mode), MinIO and any other S3-compatible object store. Offloading your uploads to cloud storage frees up server disk space, shrinks your backups, lowers bandwidth costs, and lets a global CDN deliver your images faster.
It was built for a large WooCommerce and multi-vendor marketplace on managed WordPress (where Jetpack’s image CDN virtualises some thumbnail sizes), so it is hardened against the edge cases that break naive media offload plugins.
Key features
srcset, REST API URLs and content-embedded images from the CDN.Configuration
For best security, define credentials as constants in wp-config.php:
define( 'OSMO_KEY', 'your-access-key' );
define( 'OSMO_SECRET', 'your-secret-key' );
define( 'OSMO_BUCKET', 'your-bucket' );
define( 'OSMO_REGION', 'syd1' );
define( 'OSMO_ENDPOINT', 'https://syd1.digitaloceanspaces.com' );
define( 'OSMO_CDN', 'https://cdn.example.com' );
Otherwise enter them on Media Media Offload.
This plugin connects to one external service: the S3-compatible object storage
endpoint that you configure (for example DigitalOcean Spaces, Amazon S3,
Wasabi, or a self-hosted MinIO server). It is used to store and serve your media
files.
This plugin bundles the AWS SDK for PHP v3 (Apache License 2.0, GPL-compatible)
and its dependencies (Guzzle, PSR interfaces, JMESPath, Symfony polyfills). The
SDK is namespace-isolated under OSMO\Vendor\ using php-scoper so it never
conflicts with an AWS SDK bundled by another plugin. This is namespacing, not
obfuscation, and the bundled PHP remains fully human-readable.
The full source code and the build tooling (composer.json, scoper.inc.php,
build.sh, and the post-scope patch helpers in bin/) are available so the bundled
vendor/ directory can be reproduced from scratch with bash build.sh.