diff --git a/frontend/src/components/header.tsx b/frontend/src/components/header.tsx
index c3d8493..9da9bb4 100644
--- a/frontend/src/components/header.tsx
+++ b/frontend/src/components/header.tsx
@@ -69,7 +69,13 @@ export default function Header() {
data-tooltip="Your Profile"
>
{
e.currentTarget.onerror = null; // Prevent infinite loops
e.currentTarget.src = "/guest.png";
diff --git a/frontend/src/pages/profile/layout.tsx b/frontend/src/pages/profile/layout.tsx
index 4c6f3a0..a1f4dda 100644
--- a/frontend/src/pages/profile/layout.tsx
+++ b/frontend/src/pages/profile/layout.tsx
@@ -51,9 +51,7 @@ export default function ProfileLayout() {
const joinDate = new Date(user.createdAt).toLocaleDateString("en-US", { month: "long", year: "numeric" });
const metaTitle = `${user.name} - TomodachiShare`;
const metaDescription = `View ${user.name}'s profile on TomodachiShare. Creator of ${user._count.miis} Miis. Member since ${joinDate}.`;
- const metaImage = user.image.startsWith("/profile")
- ? `${import.meta.env.VITE_API_URL}${user.image}`
- : (user.image ?? `${import.meta.env.VITE_API_URL}/guest.png`);
+ const metaImage = user.image ? (user.image.startsWith("/profile") ? `${import.meta.env.VITE_API_URL}${user.image}` : user.image) : "/guest.png";
return (