What problem does it solve? Building production media handling—image optimization, secure uploads, CDN delivery, and asset organization—requires coordinating Sharp, S3/R2 SDKs, database schemas, and UI components, which is error-prone when done from scratch. ## Core Features & Use Cases - Image Optimization with Sharp: Resize, convert to WebP/AVIF, generate responsive variants, and create BlurHash/LQIP placeholders to prevent layout shift. - Upload Patterns: Server proxy uploads for small files and presigned URL uploads with XHR progress tracking for large files up to 500MB. - Media Management Architecture: Prisma schema for MediaFile, MediaVariant, MediaFolder, and tags, plus delete-with-cleanup flows that check usage before removing R2 objects. - Use Case: Add a media library to a Next.js e-commerce app where product images are optimized to WebP, uploaded directly to Cloudflare R2 via presigned URLs, and served through a CDN with immutable cache headers. ## Quick Start Ask the AI to analyze the existing media implementation and add an optimized image upload endpoint with Sharp and R2 presigned URLs.