@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
15 lines • 859 B
TypeScript
import { type ConversionPreset, type ConversionResult, type ConvertOptions, type ImageProcessor } from '../image_processor.js';
/**
* `ImageProcessor` backed by [sharp](https://sharp.pixelplumbing.com). Auto-orients from EXIF,
* resizes/crops via `fit`, optionally blurs, converts format, and applies quality. The default output format is `webp`. Import this directly
* (`@adonis-agora/media/processors/sharp`) or select it lazily with `processors.sharp()` in config.
*/
export declare class SharpImageProcessor implements ImageProcessor {
stripMetadata(input: Buffer): Promise<Buffer | undefined>;
dimensions(input: Buffer): Promise<{
width: number;
height: number;
} | undefined>;
convert(input: Buffer, preset: ConversionPreset, options?: ConvertOptions): Promise<ConversionResult>;
}
//# sourceMappingURL=sharp.d.ts.map