Next Image Transformation
Next Image Transformation is an open-source, self-hostable service that implements the same request surface as Vercel's Next.js image optimization API and translates those requests into Imgproxy calls. It provides on-the-fly resizing, cropping, format conversion, and quality adjustments for images requested by next/image, while delegating heavy lifting to an Imgproxy backend.
The project consists of a small Bun-based request translation layer and a recommended Imgproxy instance for processing. It targets teams running Next.js who want to keep image traffic and transformation under their control rather than relying on Vercel's hosted image service.
Use Cases
- Teams running Next.js apps that need a drop-in replacement for Vercel's image optimization without changing next/image usage.
- Organizations with privacy or compliance requirements that require images to be processed within their infrastructure (on-prem or controlled cloud).
- Projects that want predictable, tunable image processing performance by running Imgproxy where they can control cache, threads, and memory.
- Hybrid approaches where teams try the hosted images.coollabs.io CDN for delivery but retain the option to self-host when ready.
- Proof-of-concept or migrations away from vendor lock-in where minimal code changes to the app are a priority.
Strengths
- Drop-in compatibility: Implements Next.js' expected request surface so you can point next/image at this service with little or no code change.
- Self-hostable control: Running the stack yourself keeps image traffic and transformation on infrastructure you own or manage.
- Imgproxy for processing: Delegates heavy processing to Imgproxy, a high-performance image server that supports many transformation options and caching.
- On-the-fly transformations: Generate responsive variants at request time, avoiding the need to store many pre-generated files.
- Optional hosted CDN: images.coollabs.io offers a hosted endpoint with a global CDN if you prefer a managed delivery option.
- Lightweight request layer: The Bun-based API is small and low-latency as the translation entrypoint.
- Configurable security: Environment variables (for example ALLOWED_REMOTE_DOMAINS) let you restrict remote sources to reduce abuse when exposed to the internet.
- Community deployment templates: Examples and templates (Docker, Railway, Coolify docs) reduce initial setup friction.
Limitations
- Additional operational component: You must run and operate Imgproxy alongside the Bun API. That adds process management, scaling, and tuning responsibilities.
- Bun runtime dependency: The translation API is written for Bun, which may require using compatible container images or additional adaptation in some environments.
- Ops work for production scale: Achieving predictable performance needs caching strategies, HTTP cache or CDN in front, monitoring, and autoscaling considerations.
- Documentation and surface area: The project is focused and smaller than large vendor offerings; some advanced or edge-case workflows may need digging through code or raising issues.
- Unclear hosted-commercial details: Public docs don’t clearly surface detailed pricing or SLA information for the hosted images.coollabs.io endpoint — contact the provider before relying on it in production.
Final Thoughts
Next Image Transformation is a practical choice when you want a low-friction way to move Next.js image handling off a managed vendor and onto infrastructure you control. It minimizes application changes by matching Next.js' image request surface and leverages Imgproxy for robust image processing.
Choose self-hosting when control, compliance, or tuning are priorities and your team can operate an additional service (Imgproxy) and manage a Bun-based translator. If you want zero-ops, a documented commercial SLA, or cannot introduce another runtime component, a fully managed image optimization service may be a better fit.