Skip to content

feat(ios): add local image sources and decode-time downsampling - #653

Open
maksg wants to merge 1 commit into
ios-parity/04-image-request-headersfrom
ios-parity/05-local-images-downsampling
Open

feat(ios): add local image sources and decode-time downsampling#653
maksg wants to merge 1 commit into
ios-parity/04-image-request-headersfrom
ios-parity/05-local-images-downsampling

Conversation

@maksg

@maksg maksg commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Matches the Android package's LocalImageLoader and inSampleSize downsampling. Non-network image sources now load: file:// URIs (including percent-encoded paths), absolute paths, base64 data: URIs, and bare names resolved as bundled resources with Android's name normalization (lowercase, dash to underscore) so cross-platform markdown resolves on both OSes. Android-only schemes (content://, asset://, res://) log and return nil.

All decodes, including network bytes, now go through CGImageSource thumbnailing capped at the screen's pixel width, so large images no longer decode at full size. EXIF orientation is baked in and results carry the screen scale, leaving point-size math unchanged.

What/Why?

Testing

PR Checklist

  • Code compiles and runs on iOS
  • Code compiles and runs on Android
  • Updated documentation/README if applicable
  • Ran example app to verify changes
  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

Matches the Android package's LocalImageLoader and inSampleSize
downsampling. Non-network image sources now load: file:// URIs
(including percent-encoded paths), absolute paths, base64 data: URIs,
and bare names resolved as bundled resources with Android's name
normalization (lowercase, dash to underscore) so cross-platform
markdown resolves on both OSes. Android-only schemes (content://,
asset://, res://) log and return nil.

All decodes, including network bytes, now go through CGImageSource
thumbnailing capped at the screen's pixel width, so large images no
longer decode at full size. EXIF orientation is baked in and results
carry the screen scale, leaving point-size math unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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