Resolve every record image from the uploads folder
A bare image filename, whatever it belongs to (organization and event logos, people photos, team and award logos, backgrounds, hero photos, block images), now resolves to /uploads/<file>, in media.ts and for link previews in pageMeta.js. The per-kind public/ folders were guesses that don't exist. Only the site's own chosen assets, the NGU logos in the nav, footer and admin, stay bundled from src/assets/logos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9eeb13c5ec
commit
dad3803ccc
6 changed files with 55 additions and 56 deletions
|
|
@ -34,8 +34,8 @@ import { eventBackground, eventLogo as eventLogoSrc, orgLogo as orgLogoSrc } fro
|
|||
const DEFAULT_ORG_LOGO = null;
|
||||
|
||||
/* An <img> that removes itself if the file 404s. `src` is already
|
||||
resolved by media.ts: an event logo from the uploads directory, an
|
||||
organization's from org-logos, anything with a path or URL as is. */
|
||||
resolved by media.ts: a bare filename from the uploads directory,
|
||||
anything with a path or URL as it is. */
|
||||
function Logo({ src, alt = "", className }) {
|
||||
const [failed, setFailed] = useState(false);
|
||||
if (!src || failed) return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue