docs: added defaults to cloudflare image plugin

This commit is contained in:
dswbx
2025-08-29 12:09:26 +02:00
parent 7dd486e2db
commit de90b3602b
2 changed files with 16 additions and 9 deletions
@@ -20,28 +20,33 @@ type ImageOptimizationSchema = s.Static<typeof schema>;
export type CloudflareImageOptimizationOptions = {
/**
* The url to access the image optimization plugin, defaults to `/api/plugin/image/optimize`
* The url to access the image optimization plugin
* @default /api/plugin/image/optimize
*/
accessUrl?: string;
/**
* The path to resolve the image from, defaults to `/api/media/file`
* The path to resolve the image from
* @default /api/media/file
*/
resolvePath?: string;
/**
* Whether to explain the image optimization schema, defaults to `false`
* Whether to explain the image optimization schema
* @default false
*/
explain?: boolean;
/**
* The default options to use, defaults to `{}`
* @param: config
* The default options to use
* @default {}
*/
defaultOptions?: ImageOptimizationSchema;
/**
* The fixed options to use, defaults to `{}`
* The fixed options to use
* @default {}
*/
fixedOptions?: ImageOptimizationSchema;
/**
* The cache control to use, defaults to `public, max-age=31536000, immutable`
* The cache control to use
* @default public, max-age=31536000, immutable
*/
cacheControl?: string;
};
@@ -194,11 +194,13 @@ Now you can add query parameters for the transformations, e.g. `?width=1000&heig
},
metadata: {
description: 'The metadata to use',
type: '"copyright" | "keep" | "none"'
type: '"copyright" | "keep" | "none"',
default: 'copyright'
},
quality: {
description: 'The quality to use',
type: 'number'
type: 'number',
default: 85
},
}}
/>