images
If you want to use a cloud provider to optimize images instead of using the Next.js built-in Image Optimization API, you can configure next.config.js
with the following:
This loaderFile
must point to a file relative to the root of your Next.js application. The file must export a default function that returns a string, for example:
Alternatively, you can use the loader
prop to pass the function to each instance of next/image
.