Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

fix: next image breaking

bautistaaa5b3f0d7df6e3
diff --git a/next.config.mjs b/next.config.mjs
index f22787af..62f3d9d3 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -30,6 +30,14 @@ const config = {
eslint: {
ignoreDuringBuilds: true,
},
+ images: {
+ remotePatterns: [
+ {
+ protocol: 'https',
+ hostname: 'avatars.githubusercontent.com',
+ },
+ ],
+ },
swcMinify: true,
};
export default config;
diff --git a/src/components/user/profile.tsx b/src/components/user/profile.tsx
index 51fa6629..d47f4ad5 100644
--- a/src/components/user/profile.tsx
+++ b/src/components/user/profile.tsx
@@ -22,7 +22,7 @@ export async function Profile({ username: usernameFromQuery }: Props) {
return (
<>
<h1>{user.id}</h1>
- <Image alt="user avatar" src={user.image ?? ''} />
+ <Image alt="user avatar" width="100" height="100" src={user.image ?? ''} />
<p>{user.email}</p>