-
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 prefetch does not work on iOS #28557
Comments
I have the same problem using simulators. It works for Android but not for iOS. |
Just confirming same problem on iOS. |
I am seeing the same, can anyone recommend an alternative library which supports prefetching in the meantime (which is not dead)? |
@CDBridger I found that react-native-fast-image is broken in the opposite way and seems like its dying so not the best alternative |
Having the exact same issue on iOS. Prefetching all my images but getting an empty cache when I call Obviously, this causes |
Same issue on iOS when offline mode |
same problem |
Can confirm this on RN 0.61.4! Measured behavior: |
same here it take sometimes for image to load up even queryCache show that image are already cache |
If I can help anyone / any team: we use our own caching mechanism using react-native-fs and it's been great so far. It's max 1 day of work and it's worth it. More control overall. 👍 |
+1 |
1 similar comment
+1 |
@Twinski is your custom caching mechanism something you could share? I'm having the same issue and always like to avoid reinventing the wheel if I can |
any solutions? |
I found the cause of this issue.
|
Any movement on this? I'm using Expo and most, if not all of the other options require a bare project to work. |
It's 2021, still issue here |
You can use react-native-fast-image into Expo using EAS Build (SDK 42). https://expo.canny.io/feature-requests/p/react-native-fast-image |
React native fast image isn't really a solution as it is not actively maintained. |
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. |
|
@61people you have context on this can you please raise PR to fix 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. |
Still exists |
I'm still experiencing this issue on a physical iOS device running bare react native. :( |
+1 |
It's been a few years now, any solutions? |
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. |
not stale |
I made a PR #48309 to try to fix this :) |
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Image.queryCache
shows an empty query cachecache: 'only-if-cached'
will result in no image shownReact Native version:
System:
OS: macOS 10.15.3
CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
Memory: 289.63 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.16.3 - /usr/local/opt/node@10/bin/node
Yarn: 1.15.2 - ~/.yarn/bin/yarn
npm: 6.9.0 - /usr/local/opt/node@10/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 28
Build Tools: 28.0.3
System Images: android-29 | Google Play Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5199772
Xcode: 11.3/11C29 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_192 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.11.0 => 16.11.0
react-native: 0.62.1 => 0.62.1
npmGlobalPackages:
react-native: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Image.prefetch(img)
only-if-cached
OR
Image.prefetch(img)
Expected Results
Scenario 1
Scenario 1
Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/yseyl0_9N
The text was updated successfully, but these errors were encountered: