UNPKG

@adonis-agora/media

Version:

Media-library for AdonisJS — owner collections (MIME whitelist, single-file replace, ordering), image conversions (eager/lazy), pluggable content transformers (HLS video via mediabunny, metadata probe, image blur-up placeholder), and column attachments, a

22 lines • 765 B
import type { ImageProcessor } from '../image_processor.js'; /** * A configured image processor: a lazy thunk the media provider calls at boot. The sharp factory * imports `sharp` only inside the thunk, so the heavy peer is loaded only when selected. */ export type ImageProcessorFactory = () => Promise<ImageProcessor>; /** * The image-processor factory namespace used in `config/media.ts`: * * ```ts * import { defineConfig, processors } from '@adonis-agora/media' * * export default defineConfig({ * imageProcessor: processors.sharp(), * }) * ``` */ export declare const processors: { /** sharp-backed resize/crop/format/quality (needs the optional `sharp` peer). */ sharp(): ImageProcessorFactory; }; //# sourceMappingURL=factory.d.ts.map