Beschreibung

LEOSP (Object Storage Plugin) is a general-purpose S3-compatible object storage plugin built on the AWS SDK for PHP. It offloads media library images and attachments from the web server to object storage, reduces local disk and bandwidth usage, and can serve files through a custom CDN domain.

Use cases

  • Sites with many images or attachments and limited disk or I/O
  • Multi-server setups that need a shared media store
  • Providers such as Amazon S3, Tencent COS, Aliyun OSS, Qiniu Kodo, Cloudflare R2, and other S3-compatible APIs
  • Faster delivery via a custom domain or CDN

Features

  • Upload original media files to object storage automatically
  • Rewrite attachment URLs for front-end delivery via object storage or a custom domain
  • Upload thumbnails asynchronously with WP-Cron to avoid blocking uploads
  • Optional „do not keep local copies“ mode after a successful remote upload
  • One-click bucket connection test in the admin settings
  • Automatic retry for failed thumbnail uploads (with a retry limit)
  • Admin error logs, clear logs, and manual retry by attachment ID
  • SecretKey encrypted with AES-GCM and never shown in plain text in the admin UI

Technical notes

  • Only files going through the media library upload flow (wp_handle_upload) are handled. Theme/plugin assets and page-builder generated CSS/JS caches are not migrated.
  • Existing historical media is not migrated automatically.
  • Since 1.1.0 the bundled AWS SDK is an S3-only build under vendor/ (about 5MB).
  • Development dependencies are defined in composer.json (included in this plugin).

This plugin relies on third-party object storage services that you configure. See External services below for details about what is sent, when, and where.

Plugin homepage

https://www.lezaiyun.com/leosp.html

Author

LaoJiang — https://www.laojiang.me/

External services

This plugin is an interface to S3-compatible object storage. It does not phone home to the plugin author. Outbound connections happen only after an administrator configures storage credentials and enables media offload (or uses Test connection). By configuring a provider, you consent to sending media and related API requests to that provider.

Depending on your settings, the plugin may use one or more of the services below.

Amazon S3

  • What it is / used for: Cloud object storage. Used to store and serve media library files when no custom Endpoint is set (default public URL format: https://{bucket}.s3.{region}.amazonaws.com/{key}), and for S3 API calls such as upload, delete, and connection tests.
  • What data is sent and when:
    • Media file contents (originals and thumbnails) when a file is uploaded or when thumbnail sync runs.
    • Object keys / paths and bucket metadata for upload, delete, and HeadBucket connection tests.
    • AccessKey / SecretKey (or equivalent credentials) are used to sign API requests; they are stored on your site and sent only to the configured storage endpoint as part of authenticated S3 API calls.
    • Site visitors requesting media may download files directly from Amazon S3 (or your CDN / custom domain) when attachment URLs are rewritten.
  • Service: Amazon S3
  • Terms of Service: https://aws.amazon.com/service-terms/
  • Privacy Policy: https://aws.amazon.com/privacy/

User-configured S3-compatible providers (optional)

If you fill in a custom Endpoint and/or custom domain, API traffic and media delivery go to the provider you choose instead of (or in addition to) the default Amazon S3 URL pattern. Common examples:

Tencent Cloud COS

  • Used for media storage and delivery when you configure a Tencent COS endpoint/bucket.
  • Same categories of data as above (media files, object keys, signed API requests) are sent to Tencent Cloud when you upload, delete, test the connection, or when visitors load rewritten media URLs.
  • Service: https://cloud.tencent.com/product/cos
  • Terms: https://cloud.tencent.com/document/product/301/17345
  • Privacy: https://www.tencentcloud.com/document/product/301/17346

Alibaba Cloud OSS

  • Used for media storage and delivery when you configure an Aliyun OSS endpoint/bucket.
  • Same categories of data as above are sent to Alibaba Cloud under the same conditions.
  • Service: https://www.alibabacloud.com/product/oss
  • Terms: https://www.alibabacloud.com/help/legal/latest/alibaba-cloud-international-website-product-terms-of-service
  • Privacy: https://www.alibabacloud.com/help/legal/latest/alibaba-cloud-international-website-privacy-policy

Qiniu Cloud Kodo

  • Used for media storage and delivery when you configure a Qiniu S3-compatible endpoint/bucket.
  • Same categories of data as above are sent to Qiniu under the same conditions.
  • Service: https://www.qiniu.com/products/kodo
  • Terms: https://www.qiniu.com/agreements/user-agreement
  • Privacy: https://www.qiniu.com/agreements/privacy-right

Cloudflare R2

  • Used for media storage and delivery when you configure an R2 endpoint/bucket (and optional custom domain).
  • Same categories of data as above are sent to Cloudflare under the same conditions.
  • Service: https://www.cloudflare.com/developer-platform/r2/
  • Terms: https://www.cloudflare.com/website-terms/
  • Privacy: https://www.cloudflare.com/privacypolicy/

Other S3-compatible services (MinIO, self-hosted, CDN front-ends, etc.)

  • If you enter another Endpoint or custom domain, media and signed API requests are sent to that host under the conditions above.
  • You are responsible for reviewing that provider’s own terms of service and privacy policy before use.

No storage traffic is sent until you save credentials and enable the feature (or click Test connection). The plugin does not collect analytics or send site data to Lao Jiang / Lezaiyun servers.

Screenshots

Installation

  1. Download a complete package that includes the vendor/ directory and composer.json.
  2. Upload the leosp folder to /wp-content/plugins/.
  3. Activate LEOSP from the Plugins screen.
  4. Go to Settings LEOSP Object Storage, fill in Bucket, Region, AccessKey, SecretKey, and related fields, then save.
  5. Click Test connection. After it succeeds, enable media offload.
  6. Upload a test image from the Media Library and confirm the public URL points to object storage or your custom domain.

Upgrade notes

  • From 1.0.0: replace the plugin completely. Dependencies now live under vendor/ instead of aws-sdk/.
  • Settings stored in the database are kept. After upgrading, run Test connection and upload a test image.

FAQ

Which object storage providers are supported?

Any S3-compatible API can be tried, including Amazon S3, Tencent COS, Aliyun OSS, Qiniu Kodo, Cloudflare R2, and MinIO. Configure Endpoint, Region, Bucket, and AccessKey/SecretKey correctly. See External services for privacy and terms links.

Why is the plugin package much smaller now?

From 1.1.0, Composer removeUnusedServices keeps only S3 and required related services. The package size drops from about 40MB+ to about 5MB, with the same upload/delete/connection-test behavior. The root composer.json describes how to rebuild those dependencies.

After enabling „do not keep local copies“, are local files removed?

Original files and synced thumbnails are removed from the local uploads directory after a successful remote upload. Files outside the media library flow (for example Elementor cache CSS) are not affected.

Will page builders such as Elementor or Divi break?

The plugin only handles media library attachments. Builder CSS/JS usually stays under local wp-content/uploads subfolders. If you enable „do not keep local copies“, regenerate builder CSS/cache so embedded image URLs stay valid.

Are existing images uploaded automatically?

No. Only media uploaded (or re-uploaded) after the plugin is enabled is offloaded. Use a migration script or third-party tool for historical files.

Connection test succeeds but images cannot be opened?

Check custom domain DNS and HTTPS, bucket or object public-read policy, and CDN origin settings.

Thumbnails never sync?

Check Recent error logs, confirm WP-Cron is running, and use Retry upload with the attachment ID.

How do developers rebuild dependencies?

In the plugin root run: composer install --no-dev --prefer-dist. Dependency metadata is in composer.json and composer.lock.

Rezensionen

Zu diesem Plugin liegen noch keine Rezensionen vor.

Mitwirkende und Entwickler

„leosp“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

Übersetze „leosp“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN-Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

1.1.4

  • Compliance: upgrade aws/aws-sdk-php to 3.395.6 (latest stable at release)
  • Compliance: remove WordPress.org-disallowed vendor files (vendor/bin/*.bat, format-check.py)
  • Build: add vendor cleanup after Composer install (removes disallowed .bat / .py files)

1.1.3

  • Compliance: keep root composer.json (and lock) in the distributed plugin for open-source dependency review
  • Compliance: document third-party / external object storage services in readme (Amazon S3 and common S3-compatible providers), including data sent, when, and terms/privacy links

1.1.2

  • Compliance: remove fopen/fclose upload path; use AWS SDK SourceFile
  • Compliance: remove error_log debug calls
  • Compliance: English readme.txt, Tested up to 7.1, max 5 tags
  • Compliance: rename plugin without the restricted „WordPress“ trademark term
  • Compliance: add languages/ Domain Path folder; stop calling load_plugin_textdomain()
  • Compliance: prefix settings template variables; harden nonce and input sanitization

1.1.1

  • Remove promo unlock modal; „do not keep local copies“ can be enabled directly

1.1.0

  • Ship S3-only AWS SDK via Composer removeUnusedServices (about 43MB to about 5MB)
  • Move dependencies from aws-sdk/vendor/ to vendor/autoload.php
  • Add WordPress.org-style readme.txt and developer build notes

1.0.0

  • Initial release
  • Media offload to S3-compatible storage, URL rewriting, async thumbnail upload and retry
  • Optional „do not keep local copies“
  • Connection test, error logs, manual retry
  • Encrypted SecretKey storage