// import type { NextConfig } from "next";

// const nextConfig: NextConfig = {
//   /* config options here */
//   images: {
//     domains: ['staging.fakeapi.dev','ui-avatars.com','localhost','d2blq4bj1mzc5m.cloudfront.net'],

//   },
// };

// export default nextConfig;


import type { NextConfig } from "next";
import path from "path";

const nextConfig: NextConfig = {
  outputFileTracingRoot: path.join(__dirname),
  images: {
    qualities: [70, 75],
    // Keep Next.js image optimization enabled for remote CDN images to reduce bandwidth and speed up loading.
    // unoptimized: false is the default, so we omit it.
    remotePatterns: [
      {
        protocol: "https",
        hostname: "mymorni.com",
        pathname: "/**",
      },
      {
        protocol: "https",
        hostname: "staging.fakeapi.dev",
        pathname: "/**",
      },
      {
        protocol: "https",
        hostname: "admin.mymorni.ai",
        pathname: "/**",
      },
      {
        protocol: "https",
        hostname: "ui-avatars.com",
        pathname: "/**",
      },
      {
        protocol: "https",
        hostname: "dummyimage.com",
        pathname: "/**",
      },
      {
        protocol: "http", // or https depending on your local setup
        hostname: "localhost",
        port: "3000",     // optional: specify the port if you're using one
        pathname: "/**",
      },
      {
        protocol: "https", // or https depending on your local setup
        hostname: "d2blq4bj1mzc5m.cloudfront.net",
        pathname: "/**",
      },
     
    ],
  },
};

export default nextConfig;