CompressX Documentation

Everything you need to install, configure, and get the best performance from CompressX Free and Pro.

CompressX Docs
Document Notice

Help Improve the Documentation

If you notice something unclear, outdated, or incorrect, feel free to let us know.

Your feedback helps keep the documentation accurate and useful for everyone.

Cloudflare CDN

Jan 1, 2026 | Docs

CompressX Pro integrates seamlessly with Cloudflare CDN. This ensures that your optimized WebP and AVIF images are correctly served through your CDN, maintaining high performance and visual quality across all browsers. This guide walks you through configuring Cloudflare CDN integration in CompressX, allowing the plugin to automatically purge Cloudflare cache after image optimization or conversion.

How to Enable Cloudflare CDN

Step 1: Access CDN Support

  • 1. Go to WordPress admin dashboard → CompressX plugin.
  • 2. CDN support.

CDN Support

Step 2: Select Cloudflare as Your CDN Provider

  • 1. Navigate to CDN Support.
  • 2. Locate the CDN Provider section.
  • 3. From the dropdown menu, select Cloudflare.

Once selected, the Cloudflare Integration settings panel will appear.
Cloudflare CDN

Step 3: Enter Your Cloudflare Credentials

Authenticate your connection by entering your API Key or API Token. The following fields are required:

Option 1 : API Key
  • 1. Global API Key:
    A key for granting access to Cloudflare API to perform actions. You can find it in your Cloudflare dashboard > My Profile > API Tokens > Global API Key.
  • 2. Cloudflare Email:
    Email address associated to your Cloudflare account.
  • 3. Zone ID:
    A zone ID is generated automatically when a domain is added to Cloudflare and is required for API operations. You can find it in your Cloudflare Dashboard > The website overview > API section.
Option 2 : API Token
  • 1. API Token:
    A token for securely authenticating requests made to the Cloudflare API. You can create a token from your Cloudflare dashboard > My Profile > API Tokens > Create Token.
  • 2. Zone ID:
    A zone ID is generated automatically when a domain is added to Cloudflare and is required for API operations. You can find it in your Cloudflare Dashboard > The website overview > API section.

Step 4: Configure Cloudflare Cache Features

Under the Features section, you can enable or disable cache-related options:

For CompressX Free:
  • 1. Purge cache automatically after bulk image optimization: Automatically clears Cloudflare cache after bulk image optimization.
  • 2. Purge cache automatically after manual image conversions (5 min delay): Automatically purges the cache after manual image conversions, incorporating a five-minute delay to prevent excessive API requests.
  • 3. Purge All Cloudflare CDN Cache Manually: If needed, you can manually clear the Cloudflare CDN cache at any time.
For CompressX Pro:

In addition to the caching features mentioned above, the Vary for Images feature is exclusively available in CompressX Pro.

  • Vary for Images: Enable Cloudflare’s Vary for Images feature to ensure the correct image variants—such as WebP, AVIF, or JPEG—are served based on browser compatibility.

Features

Tip
The Vary for Images feature is available exclusively with paid Cloudflare plans.

After configuring your CDN settings, click Save Changes to apply the updates and activate the integration.