Error: Image Optimization using Next.js default loader is not compatible with `next export`

use akamai

setting images.loader to 'imgix' caused dev and build errors.

i used this instead:

// next.config.js

module.exports = {
  images: {
    loader: 'akamai',
    path: '',
  },
}
it just works for all i care about.

possible values for images.loader are: [ default, imgix, cloudinary, akamai, custom ]
reference: https://nextjs.org/docs/api-reference/next/image#built-in-loaders

Leave a Comment