Skip to content

Image prefetch does not work on iOS #28557

Closed

Description

@rossjohnsonMP

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

React 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.

  1. Preload an image using Image.prefetch(img)
  2. display the image using only-if-cached

OR

  1. Preload an image using Image.prefetch(img)
  2. display the image

Expected Results

Scenario 1

  1. Image is shown

Scenario 1

  1. Image is instantly shown

Snack, code example, screenshot, or link to a repository:

https://snack.expo.io/yseyl0_9N

Activity

  1. changed the title [-]Image prefetch does not work on iOs[/-] [+]Image prefetch does not work on iOS[/+] on Apr 8, 2020
  2. darcoola commented on May 19, 2020

    @darcoola

    I have the same problem using simulators. It works for Android but not for iOS.

  3. martin-888 commented on Jun 3, 2020

    @martin-888

    Just confirming same problem on iOS.

  4. CDBridger commented on Jun 4, 2020

    @CDBridger

    I am seeing the same, can anyone recommend an alternative library which supports prefetching in the meantime (which is not dead)?

  5. rossjohnsonMP commented on Jun 4, 2020

    @rossjohnsonMP
    Author

    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

  6. giaset commented on Jul 6, 2020

    @giaset

    Having the exact same issue on iOS. Prefetching all my images but getting an empty cache when I call Image.queryCache

    Obviously, this causes only-if-cached to not work either

  7. nhohb commented on Aug 10, 2020

    @nhohb

    Same issue on iOS when offline mode

  8. JackClown commented on Sep 21, 2020

    @JackClown

    same problem
    react-native: 0.59.10

  9. Twinski commented on Sep 23, 2020

    @Twinski

    Can confirm this on RN 0.61.4!
    Interesting discovery: the Image.queryCache does show images which are smaller in size..

    Measured behavior:
    Loading large images (eg. Unsplash wallpapers ~1.3MB): no file stored in the fsCachedData folder
    Loading normal size images (~200KB): file stored in fsCachedData & appears in Image.queryCache

  10. punjasin commented on Oct 20, 2020

    @punjasin

    same here it take sometimes for image to load up even queryCache show that image are already cache

  11. 26 remaining items

  12. zhongwuzw commented on Dec 17, 2024

    @zhongwuzw
    Contributor

    I made a PR #48309 to try to fix this :)

  13. react-native-bot commented on Jun 16, 2025

    @react-native-bot
    Collaborator

    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.

  14. added
    Stale
    on Jun 16, 2025
  15. nrwinner commented on Jun 22, 2025

    @nrwinner

    Issue still exists

  16. removed
    Stale
    on Jun 23, 2025
  17. bglgwyng commented on Jun 25, 2025

    @bglgwyng

    @61people did you find the solution? I tested #48309 but it didn't work.

  18. react-native-bot commented on Dec 23, 2025

    @react-native-bot
    Collaborator

    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.

  19. added
    Stale
    and removed
    Stale
    on Dec 23, 2025
  20. Navneetkrh commented on Feb 10, 2026

    @Navneetkrh

    any updates on this?

  21. react-native-bot commented on Aug 10, 2026

    @react-native-bot
    Collaborator

    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.

  22. added
    Stale
    and removed
    Stale
    on Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions