diff --git a/Libraries/Image/RCTImageLoader.m b/Libraries/Image/RCTImageLoader.m index 13a485f412..527db52971 100644 --- a/Libraries/Image/RCTImageLoader.m +++ b/Libraries/Image/RCTImageLoader.m @@ -380,11 +380,6 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image, [NSURLProtocol setProperty:@"RCTImageLoader" forKey:@"trackingName" inRequest:mutableRequest]; - - // Add missing png extension - if (request.URL.fileURL && request.URL.pathExtension.length == 0) { - mutableRequest.URL = [request.URL URLByAppendingPathExtension:@"png"]; - } if (_redirectDelegate != nil) { mutableRequest.URL = [_redirectDelegate redirectAssetsURL:mutableRequest.URL]; } diff --git a/React/Base/RCTUtils.m b/React/Base/RCTUtils.m index 44e9516bf9..7a039ef89f 100644 --- a/React/Base/RCTUtils.m +++ b/React/Base/RCTUtils.m @@ -711,9 +711,6 @@ UIImage *__nullable RCTImageFromLocalAssetURL(NSURL *imageURL) if (!image) { // Attempt to load from the file system NSString *filePath = [NSString stringWithUTF8String:[imageURL fileSystemRepresentation]]; - if (filePath.pathExtension.length == 0) { - filePath = [filePath stringByAppendingPathExtension:@"png"]; - } image = [UIImage imageWithContentsOfFile:filePath]; }