Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F9583011
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
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
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Oct 11, 08:29 (17 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
984052
Default Alt Text
(1 KB)
Attached To
Mode
rRIMAGEROUTER koa-responsive-image-router
Attached
Detach File
Event Timeline
Log In to Comment