diff --git a/next.config.ts b/next.config.ts index 50a0f3d8..cf915a5f 100644 --- a/next.config.ts +++ b/next.config.ts @@ -26,6 +26,22 @@ const nextConfig: NextConfig = { // 关闭静态优化以规避 16.2.7 global-error prerender bug staticGenerationRetryCount: 0, }, + images: { + // Facebook OAuth 登录后,`picture.type(large)` 返回 + // platform-lookaside.fbsbx.com/platform/profilepic/?asid=...&hash=... + // 该 URL 是**下载链接**而非可缓存图片,next/image 优化器需要显式 allowlist。 + // graph.facebook.com 兜底:Graph 偶尔返回直链头像 / OG 图。 + remotePatterns: [ + { + protocol: "https", + hostname: "platform-lookaside.fbsbx.com", + }, + { + protocol: "https", + hostname: "graph.facebook.com", + }, + ], + }, }; export default withSerwist(nextConfig); \ No newline at end of file