Umbraco.Community.ImageSharp.TrimCache
1.0.0
See the version list below for details.
dotnet add package Umbraco.Community.ImageSharp.TrimCache --version 1.0.0
NuGet\Install-Package Umbraco.Community.ImageSharp.TrimCache -Version 1.0.0
<PackageReference Include="Umbraco.Community.ImageSharp.TrimCache" Version="1.0.0" />
<PackageVersion Include="Umbraco.Community.ImageSharp.TrimCache" Version="1.0.0" />
<PackageReference Include="Umbraco.Community.ImageSharp.TrimCache" />
paket add Umbraco.Community.ImageSharp.TrimCache --version 1.0.0
#r "nuget: Umbraco.Community.ImageSharp.TrimCache, 1.0.0"
#:package Umbraco.Community.ImageSharp.TrimCache@1.0.0
#addin nuget:?package=Umbraco.Community.ImageSharp.TrimCache&version=1.0.0
#tool nuget:?package=Umbraco.Community.ImageSharp.TrimCache&version=1.0.0
Umbraco.Community.ImageSharp.TrimCache
Scheduled, age-based trimming of the ImageSharp.Web image cache for Umbraco. Supports both the Azure Blob cache and the local physical cache, and runs in the background as a hosted service.
The ImageSharp cache accumulates resized image variants that are never cleared automatically — on Umbraco Cloud (or any blob-backed site) it can grow until it exceeds the plan's media-storage limit. This package trims those variants by age, on a schedule. Deleting a variant is safe: it is simply regenerated from the original media on the next request. The trimmer only scans the cache location you configure, so keep that separate from source media — in Azure mode, point it at a cache-only container, never the media container.
Supports Umbraco 13, 17 and 18.
Installation
dotnet add package Umbraco.Community.ImageSharp.TrimCache
The hosted service is wired up automatically — no manual registration needed. By default it trims the local physical cache; if Azure blob storage is configured it trims the Azure cache instead.
Configuration
Add an ImageCacheTrim section to appsettings.json (defaults shown):
"ImageCacheTrim": {
"Enabled": true,
"Mode": "Auto",
"MaxAgeDays": 30,
"IntervalMinutes": 1440,
"StartupDelayMinutes": 5,
"CacheFolderPath": "",
"ConnectionString": "",
"ContainerName": "",
"Prefix": ""
}
Mode—Auto(default),LocalorAzure.MaxAgeDays— entries older than this are deleted (regenerated on next request).IntervalMinutes— run frequency, measured from startup. Default 1440 (24h).CacheFolderPath— local mode only; leave empty (the default) to follow Umbraco's configured ImageSharp cache folder (Umbraco:CMS:Imaging:Cache:CacheFolder).ConnectionString+ContainerName— required for Azure mode; must point at the same container your ImageSharp Azure blob cache writes to (never the source media container). An emptyPrefixscans the whole container.RunOnEveryServer— load-balancing control; defaults to running on every server for a local (per-server) cache and only the scheduling server for a shared Azure cache.
See the project README for full documentation.
Author
Created and maintained by Justin Neville at Nevitech IT Solutions Ltd.
Credits
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- Azure.Storage.Blobs (>= 12.22.2 && < 13.0.0)
- Umbraco.Cms.Web.Common (>= 17.0.0 && < 19.0.0)
-
net8.0
- Azure.Storage.Blobs (>= 12.22.2 && < 13.0.0)
- Umbraco.Cms.Web.Common (>= 13.0.0 && < 14.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.