Skip to content

Commit dfcb0a2

Browse files
committed
Fix for react#930: Slow rendering of CameraRoll images
1 parent e0adedd commit dfcb0a2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Libraries/Image/RCTImageLoader.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ + (void)loadImageWithTag:(NSString *)imageTag callback:(void (^)(NSError *error,
6767
ALAssetRepresentation *representation = [asset defaultRepresentation];
6868
ALAssetOrientation orientation = [representation orientation];
6969
UIImage *image = [UIImage imageWithCGImage:[representation fullResolutionImage] scale:1.0f orientation:(UIImageOrientation)orientation];
70-
callback(nil, image);
70+
dispatch_async(dispatch_get_main_queue(), ^{
71+
callback(nil, image);
72+
});
7173
}
7274
});
7375
} else {

0 commit comments

Comments
 (0)