Skip to content

Fix Wikimedia photos still not loading on Android#57

Merged
dfalling merged 1 commit into
mainfrom
investigate-images-not-loading
Jul 7, 2026
Merged

Fix Wikimedia photos still not loading on Android#57
dfalling merged 1 commit into
mainfrom
investigate-images-not-loading

Conversation

@dfalling

@dfalling dfalling commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • The Fix Wikimedia photos not rendering on Android #38 fix (attaching a descriptive User-Agent to satisfy Wikimedia's UA policy) never actually took effect on Android: Image.android.js only forwards the headers prop to the native view when source resolves to an array — for a plain {uri, headers} object it silently drops them, so the request still went out with the generic okhttp/... UA and Wikimedia kept returning 403.
  • photoImageSource() now returns a single-element array instead of a plain object, so Android's Image pipeline correctly picks up the header.
  • Added a regression test locking in the array shape, since this class of bug isn't caught by tsc/lint/existing tests.

Test plan

  • tsc --noEmit
  • bun run lint
  • bun run test -- --ci

Image.android.js only forwards the `headers` prop to the native view
when `source` resolves to an array — for a plain `{uri, headers}`
object it drops them silently, so the User-Agent fix from #38 never
actually reached the network request. Return a single-element array
instead so Android's Image pipeline picks up the header.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dfalling
dfalling enabled auto-merge (squash) July 7, 2026 20:20
@dfalling
dfalling merged commit 69a6d5b into main Jul 7, 2026
1 of 2 checks passed
@dfalling
dfalling deleted the investigate-images-not-loading branch July 7, 2026 20:20
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.

1 participant