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.
Converter | File type | Description | Required |
---|---|---|---|
image_converter | JPEG, PNG, WebP, GIF and AVIF | Generate other image and change format/size etc... | sharp |
pdf_thumbnail_converter | Generate thumbnail image of PDF | poppler(pdftocairo) | |
document_thumbnail_converter | PDF, ODT, ODS, DOCX, DOC, NUMBERS, PAGES, XLSX, XLS, CSV, RTF, TXT | Generate thumbnail image of document | libreoffice-file-converter |
video_thumbnail_converter | MP4, MOV, AVI, FLV, MKV | Generate thumbnail image of video | fluent-ffmpeg |
Project sample : adonis-starter-kit