Skip to content

Images not showing issue solution #31123

@Malik-93

Description

@Malik-93

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native@0.62.2 for the project I'm working on.

By adding these changes i can see images on ios on react-native@0.62.2

Here is the diff that solved my problem:

diff --git a/node_modules/react-native/Libraries/Animated/release/.npmignore b/node_modules/react-native/Libraries/Animated/release/.gitignore
similarity index 100%
rename from node_modules/react-native/Libraries/Animated/release/.npmignore
rename to node_modules/react-native/Libraries/Animated/release/.gitignore
diff --git a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
index 21f1a06..3f7db69 100644
--- a/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
+++ b/node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
@@ -275,6 +275,8 @@ static NSUInteger RCTDeviceFreeMemory() {
   if (_currentFrame) {
     layer.contentsScale = self.animatedImageScale;
     layer.contents = (__bridge id)_currentFrame.CGImage;
+  }else {
+    [super displayLayer:layer];
   }
 }
 
diff --git a/node_modules/react-native/ReactAndroid/src/main/jni/first-party/fbjni/.npmignore b/node_modules/react-native/ReactAndroid/src/main/jni/first-party/fbjni/.gitignore
similarity index 100%
rename from node_modules/react-native/ReactAndroid/src/main/jni/first-party/fbjni/.npmignore
rename to node_modules/react-native/ReactAndroid/src/main/jni/first-party/fbjni/.gitignore
diff --git a/node_modules/react-native/ReactCommon/hermes/inspector/tools/msggen/.npmignore b/node_modules/react-native/ReactCommon/hermes/inspector/tools/msggen/.gitignore
similarity index 100%
rename from node_modules/react-native/ReactCommon/hermes/inspector/tools/msggen/.npmignore
rename to node_modules/react-native/ReactCommon/hermes/inspector/tools/msggen/.gitignore

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions