OS 17+ Breaking Change: Apple deprecated UIGraphicsBeginImageContext() and made it throw exceptions when called with zero-size dimensions. Previous iOS versions just silently failed.
Author: AshrazRashidCreated Nov 19, 2025Updated Dec 1, 2025
Hi!
Firstly, thanks for your work on this project!
Today I used patch-package to patch [email protected] for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m b/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
index f710081..06d646c 100644
--- a/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
+++ b/node_modules/react-native-fast-image/ios/FastImage/FFFastImageView.m
@@ -73,6 +73,11 @@ - (void) setImageColor: (UIColor*)imageColor {
- (UIImage*) makeImage: (UIImage*)image withTint: (UIColor*)color {
UIImage* newImage = [image imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate];
+
+ if (image.size.width <= 0 || image.size.height <= 0) {
+ return image;
+ }
+
UIGraphicsBeginImageContextWithOptions(image.size, NO, newImage.scale);
[color set];
[newImage drawInRect: CGRectMake(0, 0, image.size.width, newImage.size.height)];This issue body was partially generated by patch-package.
Source: DylanVann/react-native-fast-image