45 lines
1.6 KiB
Markdown
45 lines
1.6 KiB
Markdown
# Minio Worker
|
|
|
|
this worker is used to listen to mini events and then create new images variants
|
|
|
|
**To install dependencies:**
|
|
|
|
```bash
|
|
bun install
|
|
```
|
|
|
|
**To run:**
|
|
|
|
```bash
|
|
bun run index.ts
|
|
```
|
|
|
|
**To Build Container:**
|
|
|
|
```bash
|
|
docker buildx build --platform linux/amd64 -t git.farahty.com/nimer/minio-worker .
|
|
```
|
|
|
|
**To Push Container to Registry:**
|
|
|
|
```bash
|
|
docker push git.farahty.com/nimer/minio-worker
|
|
```
|
|
|
|
✅ **Supported Image Types (Sharp + MinIO)**
|
|
|
|
| Format | Read Support | Resize/Optimize | WebP/Thumb Output | Notes |
|
|
|----------------|--------------|------------------|-------------------|-------|
|
|
| `.jpg`, `.jpeg` | ✅ Yes | ✅ Yes | ✅ Yes | Fully supported |
|
|
| `.png` | ✅ Yes | ✅ Yes | ✅ Yes | Fully supported |
|
|
| `.webp` | ✅ Yes | ✅ Yes | ✅ Yes | Can read and re-encode |
|
|
| `.tiff`, `.tif`| ✅ Yes | ✅ Yes | ✅ Yes | Large file sizes; not common on web |
|
|
| `.gif` | ⚠️ Yes (only first frame) | ⚠️ Static only | ✅ Yes (first frame) | Sharp does **not** support animated GIFs |
|
|
| `.avif` | ✅ Yes (Sharp ≥0.29) | ✅ Yes | ✅ Yes | Needs libvips compiled with AVIF |
|
|
| `.svg` | ❌ No | ❌ No | ❌ No | Sharp **does not** support SVGs as input |
|
|
| `.bmp`, `.ico` | ✅ Yes | ✅ Yes | ✅ Yes | Low web usage; still supported |
|
|
|
|
---
|
|
|
|
This project was created using `bun init` in bun v1.2.10. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
|