Skip to content

Document thumbnail converter

⚠️ avalable in v2.3.0

Variants images for thumbnail Document are generates by LibreOffice installed on your system.

It is possible to specify the path of binaries. Useful if your installations are specific or if you are dropping off precompiled versions.

Configuration

typescript
// config/attachment.ts //
const attachmentConfig = defineConfig({
  converters: {
    preview: { 
      converter: () => import('@jrmc/adonis-attachment/converters/document_thumbnail_converter'),
    }
  }
})

By default, image format is JPEG and size is video size. options attribute use image_converter

Sample:

typescript
const attachmentConfig = defineConfig({
  converters: {
    preview: { 
      converter: () => import('@jrmc/adonis-attachment/converters/document_thumbnail_converter'),
      format: 'webp',
      resize: 720
    }
  }
})