diff --git a/Libraries/Image/RCTImageView.mm b/Libraries/Image/RCTImageView.mm index 15609120223668..42a01adb205c9c 100644 --- a/Libraries/Image/RCTImageView.mm +++ b/Libraries/Image/RCTImageView.mm @@ -234,6 +234,10 @@ - (void)cancelAndClearImageLoad [_imageLoader trackURLImageRequestDidDestroy:_loaderRequest]; _loaderRequest = nil; + + if (!self.image) { + self.image = _defaultImage; + } } - (void)clearImageIfDetached diff --git a/packages/rn-tester/js/examples/Image/ImageExample.js b/packages/rn-tester/js/examples/Image/ImageExample.js index 7bd8eda21a62af..bb43d0d610f2a9 100644 --- a/packages/rn-tester/js/examples/Image/ImageExample.js +++ b/packages/rn-tester/js/examples/Image/ImageExample.js @@ -585,7 +585,7 @@ class OnPartialLoadExample extends React.Component< } } -const fullImage = { +const fullImage: ImageSource = { uri: 'https://www.facebook.com/ads/pics/successstories.png', }; const smallImage = { @@ -747,7 +747,9 @@ exports.examples = [