Fork of Baaijte.Optimizely.ImageSharp.Web
Package now support Optimizely CMS 13.0.0+ and .NET 10.0+.
Renamed package for fork and updated ImageSharp package versions.
Added Azure blob storage support for the sample app with configurable cache folder.
Modernized codebase by applying C# modern patterns, enabling nullable reference types, file-scoped namespaces, and optimizing BlobImageProvider.
Package now uses:
- SixLabors.ImageSharp 3.1.12
- SixLabors.ImageSharp.Web 3.2.0
- SixLabors.ImageSharp.Web.Providers.Azure 3.2.0
Package now uses:
- SixLabors.ImageSharp 3.1.4
- SixLabors.ImageSharp.Web 3.1.2
- SixLabors.ImageSharp.Web.Providers.Azure 3.1.2
Targeting .NET 8
Package now uses: SixLabors.ImageSharp Version="3.1.3" SixLabors.ImageSharp.Web Version="3.1.1" SixLabors.ImageSharp.Web.Providers.Azure Version="3.1.1"
Package now uses SixLabors.ImageSharp 3.0.2 and SixLabors.ImageSharp.Web 3.0.1. Package now also references SixLabors.ImageSharp.Web.Providers.Azure
Package now uses SixLabors.ImageSharp 3.0.1 and SixLabors.ImageSharp.Web 3.0.1
- Krlbr.Optimizely.ImageSharp.Web is licensed under the Apache License, Version 2.0
- This package is supported in a best effort sense
Note As of version 4.0.0, this package targets .NET10.0 and Optimizely.CMS.Core version 13.0.0 or higher
Krlbr.OptimizelyImageSharp.Web is installed via the Optimizely NuGet feed
PM > Install-Package Krlbr.Optimizely.ImageSharp.Web -Version VERSION_NUMBERdotnet add package Krlbr.Optimizely.ImageSharp.Web --version VERSION_NUMBER
Once installed you will need to add the following code to ConfigureServices and Configure in your Startup.cs file.
This installs the default service and options.
public void ConfigureServices(IServiceCollection services) {
// Add the default service and options.
services.AddKrlbrOptimizelyImageSharp();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
// Add the image processing middleware.
app.UseKrlbrOptimizelyImageSharp();
}DO NOT add other SixLabors.ImageSharp.Web settings!!
Also add using Krlbr.Optimizely.ImageSharp.Web; at the top of your Startup.cs file if it was not automatically added.
public void ConfigureServices(IServiceCollection services) {
services.AddImageSharp()
.Configure<AzureBlobStorageCacheOptions>(options =>
{
options.ConnectionString = _configuration.GetConnectionString("EPiServerAzureBlobs");
options.ContainerName = "mysitemedia";
})
.ClearProviders()
.AddProvider<BlobImageProvider>()
.SetCache<AzureBlobStorageCache>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
// Add the image processing middleware.
app.UseKrlbrOptimizelyImageSharp();
}