0

In my react native app project of version 0.61.4, I have alot of static images that were displaying before on both ios and android devices until recently.

In my application I retrieve and display images using require. After about a year those images were no longer being displayed.

I did alot of research to this effect because I could not understand how this could just happen all of a sudden without any action on my part.

For the iOS case I discovered this solution from the following link: React Native Image not showing, How do i fix? It says something to the fact that this,

[super displayLayer:layer];

needs to be added in an if block. I want to confirm if this is really the solution for the iOS case and if so why since I did not run into this issue before, while I was developing this app 2 years ago, and had it submitted a year ago.

In the android case, I never did find a concrete solution for this. I noticed that when I cleared the app cache for my app on the android device, after re-running the app on the android device, the images no longer displayed. I tried hard to find out why this is the case and how to resolve it permanently, but all to no avail.

I came across this package library in my research called react-native-fast-image, but I was really skeptical concerning this because I dont think it handles static images but only remote images.

With all this being said, I need help in how to get the static images displayed on my react native app on both iOS and android devices. A solution will be really appreciated.

Thanks so much.

I did alot of research and kept seeing the same thing. Here are the following links:

React-native: Images not showing in android device; but shows perfectly in emulator

React Native: uri image not showing on android but perfectly displays on the ios emulator

react-native iOS app not showing static/local assets (images) after deploying

React Native Image not showing, How do i fix?

Adelaja
  • 11
  • 1

0 Answers0