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

13.0.6

Version 13 Support Policy

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

15.0.2

Version 15 Support Policy

Feature updates ended 14/08/2025
Security updates until 14/11/2025
Umbraco icon
Umbraco CMS 16

16.0.1

Version 16 Support Policy

Feature updates until 12/03/2026
Security updates until 12/06/2026

Readme

Quick Start

Install Package

dotnet add package jcdcdev.Umbraco.CloudflareMediaCache

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 (Thanks)