Soenneker.Gen.Razor.ImageOptimizer.Avif 11.0.202

Prefix Reserved
dotnet add package Soenneker.Gen.Razor.ImageOptimizer.Avif --version 11.0.202
                    
NuGet\Install-Package Soenneker.Gen.Razor.ImageOptimizer.Avif -Version 11.0.202
                    
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="Soenneker.Gen.Razor.ImageOptimizer.Avif" Version="11.0.202">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Gen.Razor.ImageOptimizer.Avif" Version="11.0.202" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Gen.Razor.ImageOptimizer.Avif">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 Soenneker.Gen.Razor.ImageOptimizer.Avif --version 11.0.202
                    
#r "nuget: Soenneker.Gen.Razor.ImageOptimizer.Avif, 11.0.202"
                    
#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 Soenneker.Gen.Razor.ImageOptimizer.Avif@11.0.202
                    
#: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=Soenneker.Gen.Razor.ImageOptimizer.Avif&version=11.0.202
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Gen.Razor.ImageOptimizer.Avif&version=11.0.202
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Gen.Razor.ImageOptimizer.Avif

Build-time progressive AVIF image optimization for Razor applications using libavif.

Install

dotnet add package Soenneker.Gen.Razor.ImageOptimizer.Avif

On each non-design-time build, the package scans wwwroot recursively for PNG and JPEG files and writes a sibling .avif file through libavif. Existing output is replaced only after a complete encode succeeds.

No application code or service registration is required.

Configuration

<PropertyGroup>
  <ImageOptimizerAvifEnabled>true</ImageOptimizerAvifEnabled>
  <ImageOptimizerAvifWwwRootPath>$(ProjectDir)wwwroot</ImageOptimizerAvifWwwRootPath>
  <ImageOptimizerAvifSourceExtensions>png;jpg;jpeg</ImageOptimizerAvifSourceExtensions>
  <ImageOptimizerAvifQuality>80</ImageOptimizerAvifQuality>
  <ImageOptimizerAvifSpeed>6</ImageOptimizerAvifSpeed>
  <ImageOptimizerAvifLossless>false</ImageOptimizerAvifLossless>
  <ImageOptimizerAvifProgressive>true</ImageOptimizerAvifProgressive>
  <ImageOptimizerAvifStripMetadata>true</ImageOptimizerAvifStripMetadata>
  <ImageOptimizerAvifForce>false</ImageOptimizerAvifForce>
  <ImageOptimizerAvifFailOnError>true</ImageOptimizerAvifFailOnError>
</PropertyGroup>

ImageOptimizerAvifOutputPath may be absolute or relative to the project. When omitted, generated files are written beside their sources while preserving the directory tree. Existing outputs are skipped unless ImageOptimizerAvifForce is true, even when the local cache is missing or the source image, encoder settings, or package version changes. Missing full-size files and responsive variants are still generated. Set ImageOptimizerAvifForce to true (or delete the affected outputs) to apply source or encoding changes to existing files.

Set ImageOptimizerAvifEnabled to false for builds that must not generate assets. With ImageOptimizerAvifFailOnError=true, any image failure fails the build; with false, failures are reported and the remaining images continue. Cancellation always stops the build task.

ImageOptimizerAvifSourceExtensions must not include avif; the optimizer refuses to overwrite a discovered source. If two differently named source extensions would produce the same output name in one directory, the collision is reported rather than choosing one.

If Soenneker.Gen.Razor.ImageOptimizer is also installed, remove avif from its ImageOptimizerFormats setting so only this package owns AVIF output.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
11.0.202 45 11/22/2026
11.0.201 72 11/21/2026
11.0.200 96 11/20/2026
11.0.199 162 11/19/2026
11.0.198 92 11/19/2026
11.0.197 79 11/19/2026
11.0.196 73 11/19/2026
11.0.195 85 11/18/2026
11.0.194 75 11/18/2026
11.0.191 110 11/18/2026
11.0.190 119 11/17/2026
11.0.189 125 11/16/2026
11.0.188 123 11/15/2026
11.0.187 106 11/15/2026
11.0.186 96 11/15/2026
11.0.185 136 11/15/2026
11.0.184 168 11/14/2026
11.0.183 110 11/14/2026
11.0.182 178 11/13/2026
11.0.181 170 11/12/2026
Loading failed

Update dependency Soenneker.Libvips.Util to 11.0.231 (#121)