@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
21 lines • 575 B
JavaScript
/**
* 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 const processors = {
/** sharp-backed resize/crop/format/quality (needs the optional `sharp` peer). */
sharp() {
return async () => {
const { SharpImageProcessor } = await import('./sharp.js');
return new SharpImageProcessor();
};
},
};
//# sourceMappingURL=factory.js.map