feat: add backend image transform types with crop support

This commit is contained in:
2026-03-07 22:58:47 -06:00
parent b724e87c1d
commit 54c9925eb6

View File

@@ -0,0 +1,23 @@
export type OutputFormat = "png" | "webp" | "jpeg";
export type FitMode = "inside" | "outside" | "cover" | "contain";
export type CropPosition =
| "center"
| "top"
| "right"
| "bottom"
| "left"
| "top-left"
| "top-right"
| "bottom-left"
| "bottom-right";
export interface TransformRequest {
width?: number;
height?: number;
quality?: number;
format?: OutputFormat;
fit?: FitMode; // "inside" = resize only, "cover" = crop to fill
position?: CropPosition; // crop anchor when using cover
}