Page MenuHomeSealhub

No OneTemporary

diff --git a/src/types/imageRouter.ts b/src/types/imageRouter.ts
index 68e97b3..0d74147 100644
--- a/src/types/imageRouter.ts
+++ b/src/types/imageRouter.ts
@@ -1,69 +1,69 @@
import sharp from "sharp";
import { DirectCropOptions, SmartCropOptions } from "../utils/smartCropImage";
export type CropDescription = SmartCropOptions | DirectCropOptions | false;
export type BaseImageParameters = {
alt: string;
lossless: boolean;
lazy: boolean;
imgStyle: string;
style: string;
targetRatio: number;
ratioDiffThreshold: number;
crop: CropDescription;
thumbnailSize: number;
};
type sizesAttr = {
sizesAttr: string;
};
export type Container = {
objectFit?: "cover" | "contain";
width: number;
height: number;
};
type resolutions = {
resolutions: number[];
};
-export type ImageParameters = Partial<BaseImageParameters> &
+export type ImageParameters = (Partial<BaseImageParameters> &
(
| (sizesAttr & resolutions)
| sizesAttr
| (resolutions & { container: Container })
| { container: Container }
- );
+ )) & { alt: string };
export type Task = {
hash: string;
resolution: number;
fileExtension: string;
crop: SmartCropOptions | DirectCropOptions | undefined;
};
export type correctExtension = "jpeg" | "png" | "avif" | "webp";
export type ImageData = {
resolutions: number[];
lossless: boolean;
originalPath: string;
targetRatio: number;
ratioDiffThreshold: number;
container: Container;
crop: CropDescription;
thumbnailSize: number;
};
export type ImageRatioClass =
| "horizontal"
| "vertical"
| "square"
| "landscape"
| "portrait"
| "ratio-crossed-threshold"
| "ratio-above-threshold"
| "ratio-below-threshold";

File Metadata

Mime Type
text/x-diff
Expires
Sat, Oct 11, 08:29 (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
984052
Default Alt Text
(1 KB)

Event Timeline