-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 component with local uri source (file://) does not render initially #17096
Comments
@fiw |
@Amurmurmur
Android 5.0.0, 6.0.0, 7.0.0 (emu or real device) - the same. |
@fiw Both Release and Debug builds? |
@Amurmurmur yes, both |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I have the same problem that some times when I navigate to some screen the ImageBackground not shown some time and some time show but after 1 or 2 seconds |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
same issue :( |
You can set the vertical gradient, and then rotate it horizontally. @ahmedraza11 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
My issue was in path. |
Still happens on react-native 0.57.7 It's only related to the files in local cache referenced with file:// protocol. |
@react-native-bot @hramos Please re-open this. Still happens with 0.58.4 and I think it could be considered a critical issue. The Image component is one of the core ones every RN developer relies on. Maybe renaming the issue as something like "Android: Image component with local uri source (file://) does not render initially" would make sense? There are several similar issues, all of them closed - a master one where progress on this is tracked should be open. When a re-render of the component tree happens, the images get rendered - same as reported by @michbil. |
Re-opened and made some edits. @sraka1 let me know if you have additional suggestions to get the description of the issue up to date. |
As a temporary solution I had to write own very simple and limited Image component for Android, to overcome this issue and display files from the disk correctly https://gist.github.com/michbil/8af7567573e18d578dd1be0493b66c75 |
My (initial) guess is it has something to do with the Fresco image cache...we might not even need it for local uris (if I’m not mistaken, currently all uri sourced images are loaded into the Fresco cache...). I’m planing to explore more tomorrow... |
did anyone found any solution? I am facing the same issue when I tries to load Image stored in my phone. |
This solution worked for me |
This still continues to be one of the MANY MANY struggles with react-native image. |
Same here. 0.63.0-rc.1 |
My issue got fixed by adding this |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This error still happens with the protocol file:// and initial the image. node: 20.10.0 |
Image components with local uri sources (file://) do not render initially. When a re-render of the component tree happens, the images get rendered.
Environment
Environment:
OS: macOS High Sierra 10.13.1
Node: 8.9.1
Yarn: 1.3.2
npm: 5.5.1
Watchman: 4.9.0
Xcode: 9.1 (9B55)
Android Studio: 3.0.1
Packages: (wanted => installed)
react-native: 0.51.0 (@sraka1 reports this is still an issue in 0.58.4)
react: 16.0.0
Target Platform: Android (5.0.0)
Steps to Reproduce
Actual Behavior
The text was updated successfully, but these errors were encountered: