Stop racing hydration with a 404 — render the logo URL that actually exists

Fixkamolos
Shipped
May 18, 2026 at 5:01 AM UTC
Author
Kamo
Commit
3204436

The tenant MinIO bucket holds logo-full.svg / logo.svg as canonical names; nobody uploads the -on-dark variants. We were trying the dark-mode URL first, 404'ing in the browser before React hydration attached the onError handler, then sitting on a broken-image because the load event had already fired and been lost. Drop the -on-dark probe so the first src is the real URL, and add a mount-time check: if the SSR-rendered img is already complete with naturalWidth=0, advance the candidate index — covers any future case where the first URL legitimately fails before hydration.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing