Skip to content

Introduction

The adonis-attachment package was designed to simplify file upload management. It allows you to create alternative files, called variants, with options for optimization, resizing, and format changes. Additionally, it automatically generates image thumbnails for document and video files.

The creation of variants is handled through Converters.

ConverterFile typeDescriptionRequired
image_converterJPEG, PNG, WebP, GIF and AVIFGenerate other image and change format/size etc...sharp
pdf_thumbnail_converterPDFGenerate thumbnail image of PDF
document_thumbnail_converterPDF, ODT, ODS, DOCX, DOC, NUMBERS, PAGES, XLSX, XLS, CSV, RTF, TXTGenerate thumbnail image of document
video_thumbnail_converterMP4, MOV, AVI, FLV, MKVGenerate thumbnail image of video
autodetect_converterChose converter by mine-type

Project sample : adonis-starter-kit