mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Back out "Add png extension only if file exist when load local image" (#47417)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47417 Backing out this change as it was breaking an internal app. I'll reland this next week when I have more time. ## Changelog: [iOS][Changed] - Revert fix that checks whether an image is present on disk. ## Facebook: This is breaking twilight. Differential Revision: D65479912 fbshipit-source-id: dcd5ac5f3d98ba2f10b9519f09d3eb1fd454da61
This commit is contained in:
1 parent
f489944051
commit
ba41228a66
1 file changed
+1
-4
@@ -477,10 +477,7 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image, CGSize size, CGFloat scal
|
||||
|
||||
// Add missing png extension
|
||||
if (request.URL.fileURL && request.URL.pathExtension.length == 0) {
|
||||
NSURL *pngRequestURL = [request.URL URLByAppendingPathExtension:@"png"];
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:pngRequestURL.path]) {
|
||||
mutableRequest.URL = pngRequestURL;
|
||||
}
|
||||
mutableRequest.URL = [request.URL URLByAppendingPathExtension:@"png"];
|
||||
}
|
||||
if (_redirectDelegate != nil) {
|
||||
mutableRequest.URL = [_redirectDelegate redirectAssetsURL:mutableRequest.URL];
|
||||
|
||||
Reference in new issue
Block a user