diff --git a/options.ts b/options.ts index 04b00b2..6e4eb28 100644 --- a/options.ts +++ b/options.ts @@ -69,7 +69,7 @@ const Options = z }), thumbnail: z .function() - .args(z.object({ src: z.string().min(1), width: z.number(), height: z.number() })) + .args(z.object({ src: z.string().min(1), width: z.number().or(z.string()), height: z.number().or(z.string()) })) .returns(z.string()), }) .transform((opts) => { diff --git a/src/helpers/images.ts b/src/helpers/images.ts index 4c88850..5d63bae 100644 --- a/src/helpers/images.ts +++ b/src/helpers/images.ts @@ -11,11 +11,11 @@ export interface Image { /** * image width */ - width: number; + width: number | string; /** * image height */ - height: number; + height: number | string; /** * blurDataURL of the image */