Features

Automatic

Simply configure your Zone ID and API Token!

Caching

Adds an ETag for all media requests with full Image Cropper query string support. 

Purge Modes

  • All - Purges the entire cache (All Cloudflare plans)
  • Prefix - Purges the media item (Cloudflare Pro & Enterprise)

Versions

Umbraco icon
Umbraco CMS

13.0.8

Version Support Policy

Feature updates ended 14/12/2025
Security updates until 14/12/2026
This is a Long Term Support (LTS) version
Umbraco icon
Umbraco CMS

16.0.2

Version Support Policy

Feature updates until 12/03/2026
Security updates until 12/06/2026
Umbraco icon
Umbraco CMS

17.0.1

Version Support Policy

Feature updates until 27/11/2027
Security updates until 27/11/2028
This is a Long Term Support (LTS) version

Readme

Installation

Install Package

Terminal window
dotnet add package jcdcdev.Umbraco.CloudflareMediaCache

Quick Start

Get Cloudflare Zone ID & API Key

You will need a Cloudflare Zone ID and API Key to use this package.

Note: The API Key should have the following permission:

  • Zone.Cache Purge

Configuration

Add the following section to your appsettings.json:

{
"Cloudflare": {
"Media": {
"Cache": {
"ZoneId": "ZONE_ID",
"ApiToken": "API_TOKEN",
"Enabled": true,
"Mode": "All",
"MaxAge": 2592000
}
}
}
}

Options

Option Description
ZoneId The Cloudflare Zone ID
Key The Cloudflare API Key
Enabled Whether to enable functionality
Mode The cache mode (All, Prefix)
MaxAge The max-age for cache headers (seconds)

Contributing

Contributions to this package are most welcome! Please visit the Contributing page.

Acknowledgements

Thank you to the following projects and individuals for their contributions. High five, you rock! 🤘🦄