DevCore.Images 13.0.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package DevCore.Images --version 13.0.1
                    
NuGet\Install-Package DevCore.Images -Version 13.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="DevCore.Images" Version="13.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DevCore.Images" Version="13.0.1" />
                    
Directory.Packages.props
<PackageReference Include="DevCore.Images" />
                    
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 DevCore.Images --version 13.0.1
                    
#r "nuget: DevCore.Images, 13.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.
#:package DevCore.Images@13.0.1
                    
#: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=DevCore.Images&version=13.0.1
                    
Install as a Cake Addin
#tool nuget:?package=DevCore.Images&version=13.0.1
                    
Install as a Cake Tool

DevCore.Images

Installation

To configure DevCore.Images in your project, follow the steps below:

  1. Add DevCore.Images to your services collection:

    In ConfigureServices method of your Startup.cs or in the Program.cs for .NET 6 and later:

    services.AddDevCoreImages();
    
  2. Use DevCore.Images in your application pipeline:

    Add the middleware in the Configure method of your Startup.cs, or in the Program.cs for .NET 6 and later, before UseStaticFiles:

    app.UseDevCoreImages();
    

Configuration

You can configure DevCore.Images using the appsettings.json file or the Configure<DevcoreImagesOptions> method.

Configuration Options

  • UseWebP: Set this to true to 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.

  1. Remove Old ClientResources:

    • Navigate to your project's ClientResources folder.
    • Delete any old FocalPoint resources.
  2. Update Module.config:

    • Open your Module.config file.
    • Remove any entries related to the old FocalPoint client resources.

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 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. 
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
Loading failed