-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image: support HTTP properties for 'source' objects #1019
Comments
Below is some detail on additional functionality this would fix (from #1080 by @brunolemos). I don't think it's possible using xhr.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
src = xhr.responseURL;
}
}; The problemWhen using an Image URI that redirects to another one, the image is not rendered. // does not work:
<Image source={{ uri: 'https://twitter.com/brunolemos/profile_image?size=original', width: 100, height: 100 }} />;
// works fine:
<Image source={{ uri: 'https://pbs.twimg.com/profile_images/1029249022903676928/GgKLxkT4.jpg', width: 100, height: 100 }} />; How to reproduce
Expected behaviorHTTP redirect should also work on web since it works on mobile Environment (include versions). Did this work in previous versions?
Screenshots |
This comment has been minimized.
This comment has been minimized.
Did someone mange to overcome this issue? |
Opened a PR to support image sources with |
Extend ImageLoader functionality to be able to work with image sources containing headers We preserve the existing strategy that works with image.src for cases where source is just an uri with no headers When sources contain headers we make a fetch request and then render a local url for the downloaded blob (URL.createObjectURL) Fix #1019 Close #2442
Extend ImageLoader functionality to be able to work with image sources containing headers We preserve the existing strategy that works with image.src for cases where source is just an uri with no headers When sources contain headers we make a fetch request and then render a local url for the downloaded blob (URL.createObjectURL) Fix #1019 Fix #2268 Close #2442
Extend ImageLoader functionality to be able to work with image sources containing headers We preserve the existing strategy that works with image.src for cases where source is just an uri with no headers When sources contain headers we make a fetch request and then render a local url for the downloaded blob (URL.createObjectURL) Fix #1019 Fix #2268 Close #2442
Image can support HTTP-Verb, Headers or a Body along with the image request. The image loader may need to be implemented using
XMLHttpRequest
.https://facebook.github.io/react-native/docs/images#network-requests-for-images
The text was updated successfully, but these errors were encountered: