CurateCoders.CloudFlarePro 13.13.0

Prefix Reserved
dotnet add package CurateCoders.CloudFlarePro --version 13.13.0
                    
NuGet\Install-Package CurateCoders.CloudFlarePro -Version 13.13.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CurateCoders.CloudFlarePro" Version="13.13.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CurateCoders.CloudFlarePro" Version="13.13.0" />
                    
Directory.Packages.props
<PackageReference Include="CurateCoders.CloudFlarePro" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CurateCoders.CloudFlarePro --version 13.13.0
                    
#r "nuget: CurateCoders.CloudFlarePro, 13.13.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CurateCoders.CloudFlarePro@13.13.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CurateCoders.CloudFlarePro&version=13.13.0
                    
Install as a Cake Addin
#tool nuget:?package=CurateCoders.CloudFlarePro&version=13.13.0
                    
Install as a Cake Tool

Curate Coders' Cloudflare Pro helper package

Nuget GitHub Workflow Status (with event)

This package provides helper classes & views to leverage Cloudflare Pro's Image Resizing service for providing responsive images using Umbraco's media cropping facilities.

To get started, install the package via Nuget:

  • Powershell

    Install-Package CurateCoders.CloudflarePro

  • dotnet CLI

    dotnet add package CurateCoders.CloudFlarePro

  • Please note! We have updated the package to introduce a far simpler way of using the package, see example 2 below but both approaches will continue to work for backwards compatibility.

Example 1 (Object Oriented Approach)

Once you have installed the package, you'll find an example Razor view in _ExampleView.cshtml.

The main parameter passed to the partial is an instance of the MediaEmbed class, which has the following parameters:

  • umbracoImage - the Umbraco image (an IPublishedContent object) you wish to generate sizes for;
  • width - default width of the primary image;
  • height - default height of the primary image;
  • quality - quality of the images to be generated based on the original (for WebP/JPEG/PNG etc.);
  • lazyLoad - whether responsive images should be lazily loaded;
  • options - Cloudflare Pro-specific options as a a POCO which then gets converted into additional querystring entries upon rendering;
  • sizes - A CSS rule to dictate at which sizes Cloudflare Pro Image Resizing should be invoked - see here for full documentation on the feature;
  • mediaQueries - a list of CloudImageMediaQuery objects, which specify at which screen size breakpoints/viewport widths you want Cloudflare Image Resizing to generate URLs for.
  • cssClasses - a nullable list of Css Classes space separated list of css classes, these will be specific to your project but will be useful for any styling tweaks if required.

In progress, in the meantime please check Views\_ExampleView.cshtml for some sample usage.

If using the sample code as-is, please change the URL on line 47 of Views\Shared\_ExamplePartialView.cshtml to be the URL of your Cloudflare account!

Example 2 (New simple declarative approach) - Updated 11/2025

Once you have installed the package, you'll find an example Razor view in _ExampleViewNew.cshtml.

The new CloudflareOptions object is passed to the HtmlHelper GetCloudflareImageTag, which has the following properties:

  • CdnZoneUrl - your media cdn folder, the root sub domain of your cdn mapped to your storage account;
  • Src - the Image.MediaUrl() src url of your image
  • Alt - the alt text meta tag for your image
  • Width - default width of the primary image;
  • Height - default height of the primary image;
  • Quality - quality of the images to be generated based on the original (for WebP/JPEG/PNG etc.);
  • LazyLoad - whether responsive images should be lazily loaded;
  • Options - Cloudflare Pro-specific options as a querystring entries upon rendering; - see here for full documentation.
  • Sizes - A CSS rule to dictate at which sizes Cloudflare Pro Image Resizing should be invoked - see here for full documentation on the feature;
  • SrcSetSpec - a comma separated string of ':' separated src specs, which are represented in the format "key:width:height" - the key must end in 'w' eg 400w or 500w - Please check Views\_ExampleViewNew.cshtml for some sample usage.
  • cssClasses - a nullable list of Css Classes space separated list of css classes, these will be specific to your project but will be useful for any styling tweaks if required.

Please check Views\_ExampleViewNew.cshtml for some sample usage. Please note you must change line 19 to be the url of your cdn including its sub domain. https://cdn.yourdomain.com/

Make sure you exclude/remove example files in your projects .csproj files: <ItemGroup Condition="'$(Configuration)' == 'Release'">
<Content Remove="Views\Shared_ExamplePartialView.cshtml" /> <Content Remove="Views_ExampleView.cshtml" /> <Content Remove="Views_ExampleViewNew.cshtml" /> </ItemGroup>

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
13.13.0 457 1/7/2026
13.12.1 473 12/11/2025
13.12.0.1 424 11/21/2025
13.12.0 464 11/20/2025
13.11.3 345 11/13/2025
13.11.2 244 11/5/2025
13.11.1 243 10/21/2025
13.11.0 189 10/17/2025
13.10.0 235 9/11/2025
13.9.3 235 10/21/2025
13.9.2 228 9/11/2025
0.2.6.1 393 9/1/2023
0.2.0 239 9/1/2023
Loading failed