We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dd6638 commit 20153cbCopy full SHA for 20153cb
packages/core/src/components/ExpoImage.tsx
@@ -54,7 +54,16 @@ const ExpoImage: React.FC<ExtendedImageProps> = ({
54
blurhash,
55
...props
56
}) => {
57
- const imageSource = source ?? Config.placeholderImageURL;
+ let imageSource = source ?? Config.placeholderImageURL;
58
+ // Prevent crash in Expo 50 when using expo-image with non-http/https URIs
59
+ if (
60
+ source &&
61
+ typeof source === "object" &&
62
+ "uri" in source &&
63
+ !/^(http|https):\/\//.test(source.uri || "")
64
+ ) {
65
+ imageSource = { uri: "" };
66
+ }
67
const finalContentFit = resizeMode
68
? resizeModeToContentFit(resizeMode)
69
: contentFit;
0 commit comments