REST API for uploading, processing, and managing images. Built with NestJS, PostgreSQL, and Cloudflare R2 (S3 compatible).
docker compose up -dSwagger UI is available at http://localhost:3000/api when the application is running.
MiniIO GUI is available at http://localhost:9001 when the application is running.
Upload and process an image.
- Content-Type:
multipart/form-data - Fields:
file(required) — Image file (JPEG, PNG, WebP). Max 10 MB.title(required) — Image titlewidth(optional) — Target output width in pixelsheight(optional) — Target output height in pixels
All images are converted to WebP (good balance between quality and size) sharp library. When width and/or height are provided, the image is scaled to fit within those dimensions while preserving the aspect ratio (fit: inside - resize the image to be as large as possible while ensuring its dimensions are less than or equal to both those specified). If omitted, the original dimensions are kept.
List images with optional filtering and pagination.
- Query parameters:
title(optional) — Filter by title (case-insensitive contains)page(optional, default: 1) — Page numberlimit(optional, default: 20, max: 100) — Items per page
Get a single image by UUID.
- Runtime: Node.js 24 + NestJS
- Database: PostgreSQL 18 (via TypeORM)
- Storage: Cloudflare R2 (S3-compatible)
- Image Processing: Sharp
- API Docs: OpenAPI v3 (Swagger)