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 93c4206 commit 1a43ee5Copy full SHA for 1a43ee5
useResponsiveImageView.js
@@ -1,6 +1,5 @@
1
import React from 'react';
2
import { Image } from 'react-native';
3
-import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource';
4
5
// A cancelable version of Image.getSize, adapted from
6
// https://github.com/kodefox/react-native-flex-image
@@ -117,7 +116,7 @@ function useResponsiveImageView({
117
116
);
118
} else {
119
// Retrieve image dimensions from imported resource
120
- const imageSource = resolveAssetSource(initialSource);
+ const imageSource = Image.resolveAssetSource(initialSource);
121
if (imageSource && imageSource.width && imageSource.height) {
122
const { width, height } = imageSource;
123
handleImageSizeSuccess(width, height);
0 commit comments