db에 이미지 URL을 넣으면, 에러가 난다

왜? 이미지를 최적화해야하는데, 비용이 들기 때문!!

그래서?

NextJS에게 특정 host url을 최적화하도록 허용해주어야한다. 비.용.절.감.

next.config.mjs

const nextConfig = {
  images: {
    remotePatterns: [
      {
        hostname: "avatars.githubusercontent.com"
      }
    ]
  }
};

export default nextConfig;

Pagination Actions