meliorence / meliorence/react-native-image-gallery

Image.getSize does not use headers

Open
#74 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
717
Forks
298
PR merge metrics
No merged PRs in 30d

Description

When loading images with something like:

[
  {
    "source": {
      "uri": "http://my.files.com/123",
      "headers": {
        "Authorization": "BASIC ..."
      }
    }
  }
]

The gallery errors because the getSize cannot be given headers and therefore sets the state to error.
As images are cached by React Native once they're loaded is it possible to run the getSize method after the image is loaded as a workaround?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Image.getSize call in the image-loading path and reproduce the failure with a protected image URI and Authorization headers. Check how the gallery loads and caches images, then verify that the gallery can determine image dimensions without entering the error state for this input.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.