It is a drop-in replacement for resizing images with Next.js used in \ component from
next/image: https://nextjs.org/docs/pages/api-reference/components/image
width query parameter to see the image resize on the fly.height query parameter to see the image crop on the fly.quality query parameter to see the image quality change on the fly.https://image.coollabs.io/image/https://cdn.coollabs.io/assets/coolify/og-image-v4.png?width=50
Next.js Image Transformation template.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.<domain> on the Next Image Transformation service.next.config.js add the following:module.exports = {
images: {
loader: 'custom',
loaderFile: './loader.js',
},
}
loader.js in the root of your project and add the following:'use client'
export default function myImageLoader({ src, width, quality }) {
return `https://<domain>/image/${src}?w=${width}&q=${quality || 75}`
}
Replace <domain> with the URL of what you set on the Next Image Transformation API.
$ claude mcp add next-image-transformation \
-- python -m otcore.mcp_server <graph>