From d0e3f72d6a05ecd5582b5ac4d1491f430db49919 Mon Sep 17 00:00:00 2001 From: "CoolChange.AI" Date: Fri, 31 Jul 2026 20:03:51 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B7=A5=E5=85=B7=20logo=20=E6=A0=87?= =?UTF-8?q?=E8=AE=B0=20unoptimized=EF=BC=8C=E4=BF=AE=E5=A4=8D=20ICO=20?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E7=BB=8F=E5=9B=BE=E7=89=87=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=99=A8=E8=A3=82=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 种子数据的 logo 均为各官网 favicon.ico,next/image 优化器(sharp)无法解码 ICO 导致全部裂图;小尺寸 logo 优化收益为零,改为浏览器直接加载, 保留懒加载与布局占位。封面图不受影响,仍走优化。 Co-Authored-By: Claude Fable 5 --- src/components/tool-logo.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/tool-logo.tsx b/src/components/tool-logo.tsx index ac3851b..7ace4e5 100644 --- a/src/components/tool-logo.tsx +++ b/src/components/tool-logo.tsx @@ -9,7 +9,9 @@ interface ToolLogoProps { } /** - * 工具 Logo:远程图走 next/image 优化; + * 工具 Logo:走 next/image(懒加载 + 布局占位),但标记 unoptimized—— + * logo 多为各官网的 favicon.ico,sharp 无法解码 ICO 格式,经优化器必然裂图; + * 且 48-80px 小图优化收益为零,直接由浏览器加载。 * data: URL(未配置 R2 时的上传回退)next/image 不支持,降级为原生 img; * 无图时显示首字母占位。 */ @@ -54,6 +56,7 @@ export function ToolLogo({ src, alt, size = 48, className }: ToolLogoProps) { width={size} height={size} style={style} + unoptimized className={cn("flex-shrink-0 rounded-lg object-cover", className)} /> );