mirror of
https://github.com/bknd-io/bknd/
synced 2026-08-04 00:56:01 +00:00
docs: added defaults to cloudflare image plugin
This commit is contained in:
@@ -20,28 +20,33 @@ type ImageOptimizationSchema = s.Static<typeof schema>;
|
|||||||
|
|
||||||
export type CloudflareImageOptimizationOptions = {
|
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;
|
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;
|
resolvePath?: string;
|
||||||
/**
|
/**
|
||||||
* Whether to explain the image optimization schema, defaults to `false`
|
* Whether to explain the image optimization schema
|
||||||
|
* @default false
|
||||||
*/
|
*/
|
||||||
explain?: boolean;
|
explain?: boolean;
|
||||||
/**
|
/**
|
||||||
* The default options to use, defaults to `{}`
|
* The default options to use
|
||||||
* @param: config
|
* @default {}
|
||||||
*/
|
*/
|
||||||
defaultOptions?: ImageOptimizationSchema;
|
defaultOptions?: ImageOptimizationSchema;
|
||||||
/**
|
/**
|
||||||
* The fixed options to use, defaults to `{}`
|
* The fixed options to use
|
||||||
|
* @default {}
|
||||||
*/
|
*/
|
||||||
fixedOptions?: ImageOptimizationSchema;
|
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;
|
cacheControl?: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -194,11 +194,13 @@ Now you can add query parameters for the transformations, e.g. `?width=1000&heig
|
|||||||
},
|
},
|
||||||
metadata: {
|
metadata: {
|
||||||
description: 'The metadata to use',
|
description: 'The metadata to use',
|
||||||
type: '"copyright" | "keep" | "none"'
|
type: '"copyright" | "keep" | "none"',
|
||||||
|
default: 'copyright'
|
||||||
},
|
},
|
||||||
quality: {
|
quality: {
|
||||||
description: 'The quality to use',
|
description: 'The quality to use',
|
||||||
type: 'number'
|
type: 'number',
|
||||||
|
default: 85
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user