Umbraco.Community.CloudflareImageUrlGenerator 2.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Umbraco.Community.CloudflareImageUrlGenerator --version 2.0.1                
NuGet\Install-Package Umbraco.Community.CloudflareImageUrlGenerator -Version 2.0.1                
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="Umbraco.Community.CloudflareImageUrlGenerator" Version="2.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Umbraco.Community.CloudflareImageUrlGenerator --version 2.0.1                
#r "nuget: Umbraco.Community.CloudflareImageUrlGenerator, 2.0.1"                
#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.
// Install Umbraco.Community.CloudflareImageUrlGenerator as a Cake Addin
#addin nuget:?package=Umbraco.Community.CloudflareImageUrlGenerator&version=2.0.1

// Install Umbraco.Community.CloudflareImageUrlGenerator as a Cake Tool
#tool nuget:?package=Umbraco.Community.CloudflareImageUrlGenerator&version=2.0.1                

CloudflareImageUrlGenerator

This package adds a ImageUrlGenerator to Umbraco that offloads image format conversion of avif and webp formats to Cloudflare Image Resizing. When implemented calls to GetCropUrl will generate Urls using this generator.

It works very well with Slimsy v4.1+ to offer avif format images as the primary source for modern browsers.

For Umbraco v10 & v11 please use v1.x

dotnet add package Umbraco.Community.CloudflareImageUrlGenerator --version 1.0.0

For Umbraco v12+ please use v2.x This Url Generator will not work with the HMACSecretKey due to the path being different so ensure that's not enabled

dotnet add package Umbraco.Community.CloudflareImageUrlGenerator --version 2.0.0

Release Downloads

NuGet Package: NuGet release

Prerelease Downloads

NuGet Package: MyGet build

Installation

1. Install from NuGet

2. Add to Startup.cs in the ConfigureServices method

.AddCloudflareImageUrlGenerator()

e.g.

services.AddUmbraco(_env, _config)
  .AddBackOffice()
  .AddWebsite()
	.AddComposers()
	.AddSlimsy()
	.AddAzureBlobMediaFileSystem()
	.AddCloudflareImageUrlGenerator()
	.Build();

3. Enable Image Resizing on Cloudflare

https://developers.cloudflare.com/images/image-resizing/enable-image-resizing/

4. Optionally disable the generator for local development

In appsettings.json

	"CloudflareImageUrlGenerator": {
		"Enabled": false
	}

Then in appsettings.production.json

	"CloudflareImageUrlGenerator": {
		"Enabled": true
	}

Or use the environment variable CloudflareImageUrlGenerator__Enabled : true for environments with Cloudflare

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
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
3.0.0 105 6/11/2024
3.0.0-beta1 96 4/18/2024
2.2.0 242 3/18/2024
2.1.0 128 3/6/2024
2.0.2 134 2/20/2024
2.0.1 125 2/20/2024
2.0.0 328 6/29/2023
1.0.0 200 6/28/2023