CurateCoders.CloudFlarePro
0.2.6.1
Prefix Reserved
dotnet add package CurateCoders.CloudFlarePro --version 0.2.6.1
NuGet\Install-Package CurateCoders.CloudFlarePro -Version 0.2.6.1
<PackageReference Include="CurateCoders.CloudFlarePro" Version="0.2.6.1" />
paket add CurateCoders.CloudFlarePro --version 0.2.6.1
#r "nuget: CurateCoders.CloudFlarePro, 0.2.6.1"
// Install CurateCoders.CloudFlarePro as a Cake Addin
#addin nuget:?package=CurateCoders.CloudFlarePro&version=0.2.6.1
// Install CurateCoders.CloudFlarePro as a Cake Tool
#tool nuget:?package=CurateCoders.CloudFlarePro&version=0.2.6.1
Curate Coders' Cloudflare Pro helper package
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
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 (anIPublishedContent
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 ofCloudImageMediaQuery
objects, which specify at which screen size breakpoints/viewport widths you want Cloudflare Image Resizing to generate URLs for.
Examples
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!
Product | Versions 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. |
-
net7.0
- Umbraco.Cms.Web.Common (>= 11.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.