Compresses and resizes image streams or byte arrays via ABP IImageCompressor and IImageResizer with ImageSharp, Magick.NET, or SkiaSharp providers.
Ships in abp-infrastructure. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use the abstractions from Volo.Abp.Imaging.Abstractions, then normally select one suitable provider package. The abstraction coordinates registered contributors; it does not contain an image codec by itself.
The common package is Volo.Abp.Imaging.Abstractions and its module is AbpImagingAbstractionsModule. Real implementations are separate packages and modules:
| Package | Module | Underlying library |
|---|---|---|
Volo.Abp.Imaging.ImageSharp | AbpImagingImageSharpModule | SixLabors.ImageSharp |
Volo.Abp.Imaging.MagickNet | AbpImagingMagickNetModule | Magick.NET |
Volo.Abp.Imaging.SkiaSharp | AbpImagingSkiaSharpModule | SkiaSharp |
Depend on the selected provider module; it already depends on the abstractions module:
using Volo.Abp.Imaging;
using Volo.Abp.Modularity;
[DependsOn(typeof(AbpImagingImageSharpModule))]
public class MediaModule : AbpModule
{
}
Provider format support and resize behavior are provider-specific. Do not add multiple providers unless contributor ordering and fallback behavior have been deliberately tested.
IImageCompressor has Stream and byte[] overloads. Both accept an optional MIME type and cancellation token:
var result = await _imageCompressor.CompressAsync(
imageBytes,
"image/jpeg",
cancellationToken);
if (result.State == ImageProcessState.Done)
{
imageBytes = result.Result;
}
ImageCompressResult<T> inherits Result and State from ImageProcessResult<T>. Handle every state:
Done: consume the returned result.Canceled: the contributor chose not to replace the original result. For the ImageSharp compressor, this means the encoded result was not smaller; it is not cancellation-token signaling.Unsupported: no contributor handled the input.For Canceled and Unsupported, the result can be the original input.
IImageResizer also has Stream and byte[] overloads:
var args = new ImageResizeArgs(
width: 640,
height: 360,
mode: ImageResizeMode.Crop);
var result = await _imageResizer.ResizeAsync(
imageBytes,
args,
"image/jpeg",
cancellationToken);
if (result.State != ImageProcessState.Done)
{
throw new InvalidOperationException($"Image resize failed: {result.State}");
}
var resizedBytes = result.Result;
ImageResizeArgs.Width and Height are uint; omitted values become 0. Mode defaults to ImageResizeMode.Default. Before invoking contributors, ImageResizer replaces Default with ImageResizeOptions.DefaultResizeMode, whose default is None.
Configure a common default only when every selected provider supports it:
Configure<ImageResizeOptions>(options =>
{
options.DefaultResizeMode = ImageResizeMode.Max;
});
Unreadable streams return Unsupported. A readable non-seekable stream is copied into a MemoryStream. The coordinator seeks streams back to position zero when possible, and a successful contributor can return a new stream. Always consume result.Result; do not assume the input stream contains processed data.
State, stream position, and whether the returned object is new or original.Volo.Abp.Imaging.Abstractions — no codec contributor will process the image.State — Result can contain the untouched input for Canceled or Unsupported.ImageProcessState.Canceled with OperationCanceledException — the ImageSharp compressor uses that state when compression would not reduce size.ImageResizeMode.Default unexplained — it resolves through ImageResizeOptions.DefaultResizeMode, which is None by default.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
image-compression, image-resize, abp-framework, dotnet-imaging
16 skills in this plugin
/check-simple-stateComposable ABP simple-state conditions on definitions and UI state objects. USE FOR: ISimpleStateChecker, ISimpleStateCheckerManager, permission/feature/authentication conditions on IHasSimpleStateCheckers. DO NOT USE FOR: tenant/edition feature values (manage-settings-and-features); permission authorization of a service call (permissions-and-authorization); startup-time module capabilities (toggle-global-features)./configure-audit-loggingABP audit logging: per-request log of requests, actions, entity change history, exceptions. USE FOR: enabling/disabling auditing, GET request logging, entity change history, AuditLogContributors, ignoring types, [Audited]/[DisableAuditing], manual scopes with IAuditingManager. DO NOT USE FOR: general application/UI logging or Serilog (configure-logging); setting/feature values (manage-settings-and-features); background jobs/workers/handlers (background-jobs-and-events)./configure-loggingABP startup, runtime, exception logging, and the startup-template Serilog bridge. USE FOR: typed ILogger in ABP services; IInitLoggerFactory/GetInitLogger startup buffering; ABP exceptions via LogException; Serilog via UseSerilog. DO NOT USE FOR: audit-log persistence and entity history (configure-audit-logging); distributed traces and metrics (out of scope, wire the OpenTelemetry .NET SDK directly); exception-to-HTTP response details (handle-validation-and-errors)./abp-infrastructure:manipulate-imagesfrom abp-infrastructure
npx claudepluginhub abpframework/abp-skills --plugin abp-infrastructureOther plugins' skills for the same job