diff --git a/src/app/search/SearchResultsClient.tsx b/src/app/search/SearchResultsClient.tsx index 37fa3bdff..c6cc31383 100644 --- a/src/app/search/SearchResultsClient.tsx +++ b/src/app/search/SearchResultsClient.tsx @@ -114,6 +114,7 @@ function formatPrice(price: number | null, currency: string) { function hasUsableProductImage(value?: string | null) { if (!value) return false; + if (value.startsWith('data:')) return false; try { const imageUrl = new URL(value); diff --git a/src/components/seo/SeoLandingPage.tsx b/src/components/seo/SeoLandingPage.tsx index 2f9a3c8aa..92a1baf88 100644 --- a/src/components/seo/SeoLandingPage.tsx +++ b/src/components/seo/SeoLandingPage.tsx @@ -33,16 +33,7 @@ function ProductGridCard({ product }: { product: LandingProduct }) { className="group flex h-full flex-col overflow-hidden rounded-[28px] border border-slate-200 bg-white shadow-sm transition-all duration-200 hover:-translate-y-1 hover:border-amber-200 hover:shadow-xl" >
- {product.imageUrl?.startsWith("data:image/svg+xml") ? ( - {product.name} - ) : product.imageUrl ? ( + {product.imageUrl ? ( {product.name} { @@ -441,7 +441,7 @@ export function buildSeoLandingSchema(config: SeoLandingPageConfig, products: La name: product.brand, } : undefined, - image: product.imageUrl || undefined, + image: product.imageUrl && !product.imageUrl.startsWith("data:image/svg+xml") ? product.imageUrl : undefined, category: product.category || undefined, offers: product.price !== null