Skip to content

Fix missing artwork images, add open-access sources & an About page#9

Merged
pedrobritx merged 1 commit into
claude/youthful-hopper-afl6vifrom
claude/friendly-cray-qfdkbc
Jun 15, 2026
Merged

Fix missing artwork images, add open-access sources & an About page#9
pedrobritx merged 1 commit into
claude/youthful-hopper-afl6vifrom
claude/friendly-cray-qfdkbc

Conversation

@pedrobritx

Copy link
Copy Markdown
Owner

Why

Some cards showed only a title and a blank image. Investigating: every blank card was an Art Institute of Chicago (AIC) work. AIC's IIIF image host (www.artic.edu/iiif/2) now sits behind Cloudflare bot protection and answers hotlinked <img> requests with an HTTP 403 "Just a moment…" challenge instead of the picture. Public image proxies (weserv, corsproxy, allorigins) are blocked too. The Met and Cleveland image hosts return 200 fine — so only Chicago broke.

What changed

1. Ensure art always shows

  • Image-proxy hook — new optional NEXT_PUBLIC_IMAGE_PROXY. AIC image URLs route through it when set; ArtImage prefers it in its fallback chain. Point it at a proxy you control (e.g. a free Cloudflare Worker) to bring AIC images back everywhere.
  • Reliability-aware default grid — each source has an imagesReliable flag; the default selection (DEFAULT_SOURCES) is the reliable set, so the wall never fills with title-only blanks. AIC stays a filter toggle and remains the browse-by-colour engine (the only source publishing dominant colour).

2. More open-access museums

  • Refactored lib/sources.ts into a pluggable adapter registry (MuseumAdapter: search / getById + imagesReliable / hasColor). Adding a museum is now local.
  • Added two keyless, CORS, CC0 sources, verified live:
    • Statens Museum for Kunst (SMK)api.smk.dk (~39k public-domain works)
    • Wikimedia Commons — broad public-domain backstop (images via Special:FilePath, which clamps width and always resolves)
  • Key-gated museums (Rijksmuseum, Harvard, Smithsonian, Europeana) can register behind NEXT_PUBLIC_* keys via the same interface; NGA is CSV opendata (build-time, future).
  • Public exports (SOURCES, searchArtworks, getArtwork, SearchCursor, …) are unchanged — new sources light up the museum filter automatically.

3. License, manifesto & links

  • New /about page: manifesto ("started wanting art on my TV → an art-museum hub for anyone"), MIT license summary, credits, and links to GitHub / LinkedIn / personal site / Buy me a coffee.
  • Root LICENSE (MIT — "use it freely, just keep the credit").
  • Quiet About link + social icons in the desktop rail, plus a Settings → About link. New icons.tsx glyphs. README updated.

Verification

  • npm run typecheck, npm run lint, npm run build all pass (11 pages exported, incl. /about).
  • Replayed the exact adapter URLs: SMK search returns 39,480 works and its transformed thumbnail loads (200 image/jpeg); Wikimedia search + pagination work and Special:FilePath images load (200); confirmed AIC's host returns 403 (hence the proxy hook).
  • Verified exported HTML contains the manifesto, license, sources, and all external links.

Notes

  • AIC images without a proxy still fall back to the tasteful placeholder (graceful by design). Set NEXT_PUBLIC_IMAGE_PROXY to restore them — see .env.example.

https://claude.ai/code/session_01Ko6vyP8nATEfBDcgCTm1qo


Generated by Claude Code

Images: the blank "title-only" cards were all Art Institute of Chicago
works. AIC's IIIF host now sits behind Cloudflare bot protection and
answers hotlinked <img> requests with a 403 challenge instead of the
image (public proxies are blocked too). Met and Cleveland load fine.

- Add an optional NEXT_PUBLIC_IMAGE_PROXY hook; AIC image URLs route
  through it when set, and ArtImage prefers it in its fallback chain.
- Mark each source imagesReliable and default the grid to the reliable
  set (DEFAULT_SOURCES) so the wall never fills with blanks. AIC stays a
  filter toggle and remains the browse-by-colour engine.

Sources: refactor lib/sources.ts into a pluggable adapter registry and
add two keyless, CORS, CC0 museums — Statens Museum for Kunst (SMK) and
Wikimedia Commons. Key-gated museums can register behind NEXT_PUBLIC_*
keys via the same interface. Public exports (SOURCES, searchArtworks,
getArtwork, …) are unchanged; new sources light up the museum filter.

About: add an /about page (manifesto, MIT license summary, credits, and
links to GitHub/LinkedIn/site/Buy me a coffee), a root MIT LICENSE, a
quiet rail footer + Settings link, new icons, and README updates.
@pedrobritx pedrobritx marked this pull request as ready for review June 15, 2026 23:25
@pedrobritx pedrobritx merged commit 503f47a into claude/youthful-hopper-afl6vi Jun 15, 2026
2 checks passed
@pedrobritx pedrobritx deleted the claude/friendly-cray-qfdkbc branch June 15, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants