LithoSharp.Images
1.0.0
dotnet add package LithoSharp.Images --version 1.0.0
NuGet\Install-Package LithoSharp.Images -Version 1.0.0
<PackageReference Include="LithoSharp.Images" Version="1.0.0" />
<PackageVersion Include="LithoSharp.Images" Version="1.0.0" />
<PackageReference Include="LithoSharp.Images" />
paket add LithoSharp.Images --version 1.0.0
#r "nuget: LithoSharp.Images, 1.0.0"
#:package LithoSharp.Images@1.0.0
#addin nuget:?package=LithoSharp.Images&version=1.0.0
#tool nuget:?package=LithoSharp.Images&version=1.0.0
LithoSharp.Images
Declared responsive raster image transforms for LithoSharp (.NET 10).
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.
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.
| 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 (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.