export interface OptimizationResult {
    buffer: Buffer;
    width: number;
    height: number;
    originalSize: number;
    optimizedSize: number;
    savings: number;
    format: 'webp' | 'original';
    mimeType: string;
    filename: string;
    blurHash?: string;
}
export interface OptimizeOptions {
    quality?: number;
    maxWidth?: number;
    maxHeight?: number;
    /** Skip WebP conversion for these MIME types */
    preserveFormats?: string[];
}
/**
 * Optimizes an image: converts to WebP, resizes if too large,
 * extracts dimensions, and generates a tiny blur placeholder.
 * Non-image files and SVGs/GIFs are returned unchanged.
 */
export declare function optimizeImage(input: Buffer | ArrayBuffer | Uint8Array, originalFilename: string, mimeType: string, opts?: OptimizeOptions): Promise<OptimizationResult>;
/**
 * Extracts image metadata without performing optimization.
 * Useful for non-destructive dimension/format reads.
 */
export declare function getImageMetadata(input: Buffer | ArrayBuffer | Uint8Array): Promise<{
    width: number;
    height: number;
    format: keyof import("sharp").FormatEnum;
    hasAlpha: boolean;
    isAnimated: boolean;
    space: keyof import("sharp").ColourspaceEnum;
} | null>;
export declare function formatBytes(bytes: number): string;
//# sourceMappingURL=optimize.d.ts.map