diff --git a/docs/02-app/02-api-reference/05-next-config-js/images.mdx b/docs/02-app/02-api-reference/05-next-config-js/images.mdx index 471ac6e64df41a..6adb15cac47782 100644 --- a/docs/02-app/02-api-reference/05-next-config-js/images.mdx +++ b/docs/02-app/02-api-reference/05-next-config-js/images.mdx @@ -66,6 +66,7 @@ To learn more about configuring the behavior of the built-in [Image Optimization - [Sirv](#sirv) - [Supabase](#supabase) - [Thumbor](#thumbor) +- [Nitrogen AIO](#nitrogen-aio) ### Akamai @@ -240,3 +241,20 @@ export default function thumborLoader({ src, width, quality }) { return `https://example.com${params.join('/')}${src}` } ``` + +### Nitrogen AIO + +```js +// Docs: https://docs.n7.io/aio/intergrations/ +export default function aioLoader({ src, width, quality }) { + const url = new URL(src) + const params = url.searchParams + const aioParams = params.getAll('aio') + aioParams.push(`w-${width}`) + if (quality) { + aioParams.push(`q-${quality.toString()}`) + } + params.set('aio', aioParams.join(';')) + return url.href +} +```