From dd0087b8b38a85bf540579a552eff9611606fb8a Mon Sep 17 00:00:00 2001 From: jay Date: Tue, 2 Jun 2026 07:23:11 +0000 Subject: [PATCH] Hero falls back to the next image when the lead's won't load MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some sources hotlink-protect their images (e.g. Guardian's i.guim.co.uk → 401), so a perfectly-enriched lead could still render an imageless hero. The browser is the only true judge of loadability, so on a hero image error, promote the next brief item that has an image into the hero slot; the failed lead becomes a text tile. Resets to the lead on each fresh brief. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../src/lib/components/ArticleCard.svelte | 4 ++-- frontend/src/routes/+page.svelte | 22 +++++++++++++++---- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/ArticleCard.svelte b/frontend/src/lib/components/ArticleCard.svelte index c729bb6..abfa14e 100644 --- a/frontend/src/lib/components/ArticleCard.svelte +++ b/frontend/src/lib/components/ArticleCard.svelte @@ -1,5 +1,5 @@