shlogg · Early preview
Joodi @miladjoodi

Resolving "images.domains" Configuration Is Deprecated In Next.js

Next.js v12.3.0 deprecates images.domains. Update to images.remotePatterns for granular control over external image sources.

Resolving the The "images.domains" Configuration is Deprecated Error in Next.js


Starting from Next.js version 12.3.0, the images.domains configuration has been deprecated. Instead, you should use the new images.remotePatterns configuration. This guide explains how to update your configuration to resolve this warning.


  
  
  Current Configuration

If your current configuration looks like this:

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: false, // Disabling Strict Mode
  images: {
    domains: ["images.pexels.com"],
  },
};
export default nextConfig;...