⚠ The "images.domains" configuration is deprecated. Please use "images.remotePatterns" configuration instead.
와 같은 에러가 발생하여 claude에 물어보니
외부 Image 도메인 설정하는 방법이 바뀌었다고 한다
아래와 같이 해야한다
const nextConfig: NextConfig = {
/* config options here */
images: {
domains: [
"ui-avatars.com", // 기본 아바타 이미지
"lh3.googleusercontent.com", // 실제 사용자 이미지 도메인
],
},
};
이전
const nextConfig: NextConfig = {
/* config options here */
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'ui-avatars.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: 'lh3.googleusercontent.com',
port: '',
pathname: '/**',
},
],
},
};
export default nextConfig;
이후
'개발 > NEXTJS' 카테고리의 다른 글
| nextjs에서 swr과 react query 비교 (0) | 2025.01.27 |
|---|---|
| 병렬라우팅과 일반 컴포넌트 방식 비교 (1) | 2025.01.22 |
| supabase nextjs 인증 구축하기 (3) | 2025.01.15 |
| Next.js Image 컴포넌트의 width, height, sizes, srcset 이해하기 (0) | 2025.01.06 |
| Next.js 15의 새로운 데이터 페칭 전략 이해하기 (2) | 2025.01.05 |