DevCore.Images
13.0.1
dotnet add package DevCore.Images --version 13.0.1
NuGet\Install-Package DevCore.Images -Version 13.0.1
<PackageReference Include="DevCore.Images" Version="13.0.1" />
<PackageVersion Include="DevCore.Images" Version="13.0.1" />
<PackageReference Include="DevCore.Images" />
paket add DevCore.Images --version 13.0.1
#r "nuget: DevCore.Images, 13.0.1"
#:package DevCore.Images@13.0.1
#addin nuget:?package=DevCore.Images&version=13.0.1
#tool nuget:?package=DevCore.Images&version=13.0.1
DevCore.Images
Installation
To configure DevCore.Images in your project, follow the steps below:
Add
DevCore.Imagesto your services collection:In
ConfigureServicesmethod of yourStartup.csor in theProgram.csfor .NET 6 and later:services.AddDevCoreImages();Use
DevCore.Imagesin your application pipeline:Add the middleware in the
Configuremethod of yourStartup.cs, or in theProgram.csfor .NET 6 and later, beforeUseStaticFiles:app.UseDevCoreImages();
Configuration
You can configure DevCore.Images using the appsettings.json file or the Configure<DevcoreImagesOptions> method.
Configuration Options
UseWebP: Set this totrueto always serve images in WebP format.HmacSecretKey: A shared unique secret for HMAC validation to ensure URL integrity across servers and over time. If not set, it will default to using DataProtection, which may regenerate on server startup or periodically, depending on the server setup.
Example Configuration in appsettings.json
Add the following section to your appsettings.json file to configure DevCore.Images:
{
"DevCoreImages": {
"UseWebP": true,
"HmacSecretKey": "A SHARED UNIQUE SECRET"
}
}
Example Configuration in Code
Alternatively, you can configure DevCore.Images programmatically in your startup configuration:
services.Configure<DevcoreImagesOptions>(options =>
{
options.UseWebP = true;
options.HmacSecretKey = "A SHARED UNIQUE SECRET";
});
Upgrade Notice
FocalPoint ClientResources Removal
If you are upgrading from an older version of DevCore.Images, you will need to remove any previously copied FocalPoint client resources from your project's ClientResources folder and Module.config file. This is necessary to avoid conflicts and ensure your project uses the latest resources provided by the updated library.
Remove Old ClientResources:
- Navigate to your project's
ClientResourcesfolder. - Delete any old FocalPoint resources.
- Navigate to your project's
Update
Module.config:- Open your
Module.configfile. - Remove any entries related to the old FocalPoint client resources.
- Open your
Usage
Once configured, DevCore.Images will handle image processing based on the provided configurations. Ensure your URLs are properly formed and secure if you use the HMAC secret key.
Serving Images
When making requests for images, ensure that your URLs align with the expected format defined by the DevCore.Images library and that they are correctly hashed if HMAC is enabled.
WebP Format
If UseWebP is set to true, images will always be served in WebP.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- EPiServer.CMS.Core (>= 13.0.2)
- EPiServer.CMS.UI.Core (>= 13.0.2)
- EPiServer.Framework (>= 13.0.2)
- SixLabors.ImageSharp (>= 3.1.12)
- SixLabors.ImageSharp.Web (>= 3.2.0)
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 |
|---|