[object Object]

← back to Homesonspec

Builder-image kill-switch: BUILDER_IMAGES_ENABLED env gates all photo render sites (default ON) — one flip to compliance pending media-rights decision (DTD panel FIX-THEN-SHIP)

2968a9239ce07e1ceb53aa949689cc9aa04b79fa · 2026-07-22 20:58:00 -0700 · Steve

Files touched

Diff

commit 2968a9239ce07e1ceb53aa949689cc9aa04b79fa
Author: Steve <steve@designerwallcoverings.com>
Date:   Wed Jul 22 20:58:00 2026 -0700

    Builder-image kill-switch: BUILDER_IMAGES_ENABLED env gates all photo render sites (default ON) — one flip to compliance pending media-rights decision (DTD panel FIX-THEN-SHIP)
---
 apps/web/src/app/homes/[id]/page.tsx | 8 +++++---
 apps/web/src/app/page.tsx            | 6 +++++-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/apps/web/src/app/homes/[id]/page.tsx b/apps/web/src/app/homes/[id]/page.tsx
index 10968d8..476cdb2 100644
--- a/apps/web/src/app/homes/[id]/page.tsx
+++ b/apps/web/src/app/homes/[id]/page.tsx
@@ -56,6 +56,8 @@ export default async function HomeDetailPage({ params }: { params: Promise<{ id:
     }),
   ]);
   const incentives = [...home.incentives, ...communityIncentives];
+  // Kill-switch for third-party builder photography (media-rights gate).
+  const showImages = process.env.BUILDER_IMAGES_ENABLED !== "0";
 
   const facts: [string, string][] = [
     ["Price", fmtPrice(home.price === null ? null : Number(home.price))],
@@ -89,7 +91,7 @@ export default async function HomeDetailPage({ params }: { params: Promise<{ id:
           renders here once ingested (see the image-ingestion follow-up). */}
       <div className="mt-3 overflow-hidden rounded-2xl border border-brand-600/30 shadow-[var(--shadow-card)]">
         <div className="relative h-56 bg-gradient-to-br from-brand-800 via-brand-700 to-brand-500 sm:h-72">
-          {home.images[0] ? (
+          {showImages && home.images[0] ? (
             // eslint-disable-next-line @next/next/no-img-element
             <img src={home.images[0]} alt={`${home.street ?? home.community.name} exterior`}
               fetchPriority="high" className="absolute inset-0 h-full w-full object-cover" />
@@ -127,7 +129,7 @@ export default async function HomeDetailPage({ params }: { params: Promise<{ id:
         </Link>
       </p>
 
-      {home.images.length > 1 ? (
+      {showImages && home.images.length > 1 ? (
         <div className="mt-3 flex gap-2 overflow-x-auto pb-1" data-testid="home-gallery">
           {home.images.slice(0, 8).map((src, i) => (
             // eslint-disable-next-line @next/next/no-img-element
@@ -253,7 +255,7 @@ export default async function HomeDetailPage({ params }: { params: Promise<{ id:
             {otherHomes.map((h) => (
               <Link key={h.id} href={`/homes/${h.id}`} className="card-interactive w-64 shrink-0 snap-start overflow-hidden">
                 <div className="relative h-32 bg-gradient-to-br from-brand-800 via-brand-700 to-brand-500">
-                  {h.images[0] ? (
+                  {showImages && h.images[0] ? (
                     // eslint-disable-next-line @next/next/no-img-element
                     <img src={h.images[0]} alt="" loading="lazy" className="absolute inset-0 h-full w-full object-cover" />
                   ) : null}
diff --git a/apps/web/src/app/page.tsx b/apps/web/src/app/page.tsx
index fc9e0e9..70ab6d4 100644
--- a/apps/web/src/app/page.tsx
+++ b/apps/web/src/app/page.tsx
@@ -69,6 +69,10 @@ export default async function HomePage() {
     { tier: "Luxury", home: highHome },
   ].filter((f): f is { tier: string; home: NonNullable<typeof f.home> } => f.home !== null);
 
+  // Kill-switch: set BUILDER_IMAGES_ENABLED=0 (pm2 env) to instantly stop showing
+  // third-party builder photos site-wide, pending a media-rights decision.
+  const showImages = process.env.BUILDER_IMAGES_ENABLED !== "0";
+
   return (
     <div>
       <section className="relative overflow-hidden bg-gradient-to-b from-brand-950 via-brand-900 to-brand-800 px-4 py-20 text-white">
@@ -132,7 +136,7 @@ export default async function HomePage() {
             {featured.map(({ tier, home }) => (
               <Link key={home.id} href={`/homes/${home.id}`} className="card-interactive overflow-hidden">
                 <div className="relative h-44 bg-gradient-to-br from-brand-800 via-brand-700 to-brand-500">
-                  {home.images[0] ? (
+                  {showImages && home.images[0] ? (
                     // eslint-disable-next-line @next/next/no-img-element
                     <img src={home.images[0]} alt={`${home.community.name} home`} loading="lazy" className="absolute inset-0 h-full w-full object-cover" />
                   ) : null}

← f5b9111 Contrarian fixes: StagedRecord unique (source,snapshot,home)  ·  back to Homesonspec  ·  Design review fix: dedupe home detail Data-provenance table 8231981 →