From 8915f6921503d009f5fad8989103a43f7d35c142 Mon Sep 17 00:00:00 2001 From: Julian Tabel Date: Sat, 7 Feb 2026 21:37:15 +0100 Subject: [PATCH] Support both PNG and JPG box art images Try .png first, then .jpg, falling back to the color swatch only if neither format exists for a game slug. Co-Authored-By: Claude Opus 4.6 --- frontend/src/components/GameCard.tsx | 10 +++++----- frontend/src/pages/NewRun.tsx | 9 +++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/frontend/src/components/GameCard.tsx b/frontend/src/components/GameCard.tsx index 5d96e27..0d47d6c 100644 --- a/frontend/src/components/GameCard.tsx +++ b/frontend/src/components/GameCard.tsx @@ -11,8 +11,8 @@ interface GameCardProps { export function GameCard({ game, selected, onSelect }: GameCardProps) { const backgroundColor = game.color ?? DEFAULT_COLOR - const [imgError, setImgError] = useState(false) - const boxArtSrc = `/boxart/${game.slug}.png` + const [imgIdx, setImgIdx] = useState(0) + const boxArtSrcs = [`/boxart/${game.slug}.png`, `/boxart/${game.slug}.jpg`] return (