LithoSharp.Images
2.1.3
See the version list below for details.
dotnet add package LithoSharp.Images --version 2.1.3
NuGet\Install-Package LithoSharp.Images -Version 2.1.3
<PackageReference Include="LithoSharp.Images" Version="2.1.3" />
<PackageVersion Include="LithoSharp.Images" Version="2.1.3" />
<PackageReference Include="LithoSharp.Images" />
paket add LithoSharp.Images --version 2.1.3
#r "nuget: LithoSharp.Images, 2.1.3"
#:package LithoSharp.Images@2.1.3
#addin nuget:?package=LithoSharp.Images&version=2.1.3
#tool nuget:?package=LithoSharp.Images&version=2.1.3
LithoSharp.Images
Declared responsive raster image transforms for LithoSharp (.NET 10).
dotnet add package LithoSharp.Images --version 2.1.3
Use matching Core and Images versions. Register the same ImageAsset declaration
instances with generation and rendering so their declared outputs can be resolved.
using LithoSharp;
using LithoSharp.Images;
var image = new ImageAsset(
new SiteAsset("photo", "assets", "photo.jpg", "images/original.jpg"),
[new ImageVariant("jpeg", "images/photo.jpg", 640, ImageFormat.Jpeg),
new ImageVariant("webp", "images/photo.webp", 640, ImageFormat.WebP)]);
var options = new SiteGenerationOptions
{
Assets = [image.Source],
AssetTransforms = [image.Transform],
AssetCacheDirectory = ".lithosharp/assets"
};
// In a layout: ResponsiveImage.Render(context.Assets, image, "Lake at dawn")
The renderer encodes alt text and attributes and emits intrinsic dimensions,
format sources, srcset, sizes and lazy loading. PNG/JPEG fallback, positive widths,
quality 0–100 and distinct format/width pairs are required. Invalid images fail
before output publication. Cached bytes are verified; corrupt entries regenerate.
Place the cache outside the output directory. RAW and DNG sources are unsupported
by SkiaSharp 4.153.1; convert them to PNG or JPEG before declaring an image.
On Linux, install the .NET native prerequisites, including libstdc++.so.6;
SkiaSharp 4.153.1 needs it even with Linux.NoDependencies.
PNG/JPEG/WebP need no external executable. AVIF requires a trusted avifenc path:
new ExternalAvifEncoder(path, dependencyFingerprint: "installed-tool-and-codec-versions").
Pass it to ImageAsset with an AVIF variant and a fallback. Tool bytes and settings
are fingerprinted; changed tools are rejected even on cache hits. Recreate declarations
after updates. No PATH discovery or downloads occur. See the official
avifenc manual.
See assets and images for source roots, output paths, transform registration and cache restrictions.
| 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
- LithoSharp (>= 2.1.3)
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 |
|---|---|---|
| 4.0.0 | 94 | 11/20/2026 |
| 3.1.0 | 117 | 11/17/2026 |
| 3.0.0 | 93 | 11/16/2026 |
| 2.2.0 | 400 | 11/9/2026 |
| 2.1.3 | 92 | 11/7/2026 |
| 2.1.2 | 112 | 10/31/2026 |
| 2.1.1 | 100 | 10/29/2026 |
| 2.1.0 | 97 | 10/28/2026 |
| 2.0.1 | 96 | 10/25/2026 |
| 2.0.0 | 125 | 10/17/2026 |
| 1.1.0 | 705 | 10/7/2026 |
| 1.0.0 | 498 | 9/15/2026 |
| 0.3.1 | 127 | 9/9/2026 |
| 0.3.0 | 134 | 9/8/2026 |