Linux 软件免费装
Banner图

Images Sync for Cloudflare

开发者 301st
更新时间 2026年3月3日 05:09
PHP版本: 8.0 及以上
WordPress版本: 6.9
版权: GPL-2.0+
版权网址: 版权信息

标签

images cdn acf cloudflare headless

下载

1.0.7

详情介绍:

Images Sync for Cloudflare automatically uploads your WordPress images to Cloudflare Images and stores optimized delivery URLs directly in post meta. Perfect for headless setups, JAMstack sites, or anyone who wants fast, globally-distributed images without changing their workflow. Why Use This Plugin? Headless frontends need stable, cacheable CDN URLs. This plugin makes WordPress the source of truth while Cloudflare Images handles delivery and optimization. No custom resolvers needed — just query the meta field. Features Security Your Cloudflare API token is encrypted at rest using modern cryptography (libsodium or AES-256-CBC with HMAC). The token is never stored in plain text and is only decrypted when making API requests. Requirements

安装:

  1. Upload the plugin folder to /wp-content/plugins/ or install via WordPress admin
  2. Activate the plugin through the Plugins menu
  3. Go to CF Images → Settings and enter your Cloudflare credentials
  4. Create presets under CF Images → Presets (or install recommended presets)
  5. Set up mappings under CF Images → Mappings to define sync rules
Quick Start
  1. Credentials — Get your Account ID, Account Hash, and API Token from Cloudflare dashboard
  2. Preset — Create a preset like og_1200x630 with variant w=1200,h=630,fit=cover,f=auto
  3. Mapping — Map your CPT's featured image to a meta field like _og_image_url
  4. Done — Images sync on save, URLs available via get_post_meta()

屏幕截图:

  • Settings page with API configuration and Flexible Variants status
  • Presets page with recommended presets and Universal/Flexible badges
  • Mapping configuration with source, target, and preset selection
  • Preview Studio for testing presets with live images

升级注意事项:

1.0.7 Prefix renamed from cfi to cfimg per WP.org review. Database keys migrate automatically. 1.0.5 Text domain and plugin file renamed to match WP.org assigned slug images-sync-for-cloudflare. 1.0.4 WP.org review compliance: external services section, prepared SQL, ACF tag. 1.0.3 Complete uninstall cleanup — encrypted token and migration version removed. 1.0.2 New content_1200w preset, fit modes FAQ, improved settings UX. 1.0.1 WordPress.org Plugin Check compliance, %i placeholders, external services disclosure. 1.0.0 First stable release with encrypted token storage and WordPress.org assets.

常见问题:

What Cloudflare plan do I need?

Cloudflare Images is a paid add-on available on all Cloudflare plans. Pricing is based on images stored and served.

Does this modify my original images?

No. The plugin uploads a copy to Cloudflare Images. Your WordPress media files remain unchanged.

Can I use this with ACF?

Yes. The plugin supports ACF image fields with ID, array, and URL return formats.

What are Flexible Variants?

Flexible Variants allow on-the-fly image transformations via URL parameters (width, height, quality, format). The plugin detects if this feature is enabled on your account and adjusts the UI accordingly.

What fit modes are available?

Cloudflare Images supports several fit modes for resizing:

  • scale-down — Shrinks to fit within dimensions but never upscales. Best for content images where originals may be smaller than the target.
  • cover — Crops to fill exact dimensions. Best for OG images, thumbnails, and heroes where consistent sizing matters.
  • contain — Scales to fit within dimensions, adding letterboxing if needed. Preserves the full image.
  • crop — Crops to exact dimensions from the center (or custom gravity).
Most presets use fit=cover for consistent sizing. Use fit=scale-down when you want to limit max width without stretching small images.

Do I need Action Scheduler?

Action Scheduler is optional but recommended for bulk syncing. It offloads image uploads to background jobs, avoiding timeouts on large sites. Action Scheduler is bundled with WooCommerce, or you can install it as a standalone plugin.

Is this good for headless WordPress?

Absolutely. Delivery URLs are stored as standard post meta, so they're immediately available via REST API or WPGraphQL without any custom resolvers.

What happens if I deactivate the plugin?

Your Cloudflare Images remain on Cloudflare, and the delivery URLs stay in post meta. You can continue using them or migrate to another solution.

更新日志:

1.0.7 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0 0.2.5 0.2.4 0.2.3 0.2.2 0.2.1 0.2.0 0.1.10-beta 0.1.0-beta