selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

next-image-transformation logo

Self-host next-image-transformation

0.0.3

Drop-in image optimization API for Next.js apps

BetaOpen SourceApache-2.0
Updatedlast year
LanguageJavaScript
Setup difficultyEasy
Stars
638
Install with Coolify
next-image-transformation screenshot 1

What is next-image-transformation?

Next.js Image Transformation is an open-source image optimization service that lets you run your own version of Vercel's Next.js image optimization. A small API written in Bun converts incoming requests into Imgproxy format and passes them on to an Imgproxy instance, which handles the actual resizing, cropping and transformation. Width, height and quality are the transformations supported so far, each applied through a query parameter. Self-hosting goes through a Coolify service template that bundles both components, and a Next.js app hooks into it by declaring a custom loader in next.config.js that points at your optimization domain; the optional ALLOWED_REMOTE_DOMAINS variable limits which source domains can be processed. A hosted cloud variant with a global CDN is also offered by the same team. The project is pre-1.0 (latest tag 0.0.3) and the repository was last pushed in December 2024.

Should you self-host next-image-transformation?

next-image-transformation scores 40/100 on selfhost.directory (how scoring works) and ranks #13 of 13 in Image Processing. It has 638 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. It is Apache-2.0-licensed and written mostly in JavaScript.

Its closest alternative on selfhost.directory is Rembg (78/100, 25 214 stars). It scores higher overall, so compare the two before you pick. See next-image-transformation vs Rembg side by side.

Features

  • Image quality control
  • On-the-fly image cropping
  • On-the-fly image resizing
  • Remote domain allowlist

next-image-transformation README

How to install next-image-transformation

Install next-image-transformation with Coolify

Environment variables
ALLOWED_REMOTE_DOMAINS
  1. Login to your Coolify instance or the cloud.
  2. Create a new service and select the Next.js Image Transformation template.
  3. Optional: Set the ALLOWED_REMOTE_DOMAINS environment variable to the domain of your images (e.g. example.com,coolify.io). By default, it is set to * which allows any domain.
  4. Set the your <domain> on the Next Image Transformation service.
  5. Deploy your service.

Bundled as a Coolify service template; the bundle includes the Next Image Transformation API and the Imgproxy service.

How to configure next-image-transformation

  • ALLOWED_REMOTE_DOMAINS*Comma-separated list of domains allowed as image sources; defaults to any domain.

    Comma-separated list of domains allowed as image sources; defaults to any domain.

    values: Comma-separated domains, or * for any domain

next-image-transformation releases & version history

More in Image Processing

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…