Fix Images Not loading In iOS 14 — React Native

Quick guide to patch React Native without upgrading

Photo by Silas Baisch on Unsplash
$ npm install patch-package
$ vi node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m
Original
Updated
#pragma mark - CALayerDelegate

- (void)displayLayer:(CALayer *)layer
{
if (_currentFrame) {
layer.contentsScale = self.animatedImageScale;
layer.contents = (__bridge id)_currentFrame.CGImage;
} else {
[super displayLayer:layer];
}
}
$ npx patch-package react-native
$ git add patches/*
// package.json"scripts": {
...
"postinstall": "patch-package",
}

I'm a Full-Stack Software Engineer who believes in the power of technology to change and improve lives. Connect with me on https://twitter.com/IamJQN

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store