faster-image icon indicating copy to clipboard operation
faster-image copied to clipboard

FasterImageView not working on IOS with latest React Native version

Open coderBeat opened this issue 1 year ago • 4 comments

I tried to use FasterImageView in both Android & IOS. In Android it is working fine. But in IOS, the images are empty, nothing is loaded.

 "@candlefinance/faster-image": "^1.6.2",
 "react-native": "0.75.3",
<FasterImageView
                        source={{
                          url: user_image,
                          borderRadius: 64,
                        }}
                        style={[
                          {
                            height: 28,
                            ),
                            width: 28,
                            ),
                          },
                        ]}
                      />

What should be done to fix this error ?

coderBeat avatar Sep 24 '24 12:09 coderBeat

There's an onError callback, is that being called?

gtokman avatar Sep 28 '24 12:09 gtokman

I am not sure about that. Let me call the function manually and check the output.

coderBeat avatar Sep 30 '24 08:09 coderBeat

IOS only:

OnSuccess is being called. But no image is shown.

Code:

                        onSuccess={event => {
                          console.warn('success', event.nativeEvent);
                        }}

Output:

{"height": 100, "source": "*****", "target": 3169, "width": 100}

Sample:

a4

coderBeat avatar Sep 30 '24 11:09 coderBeat

IOS only:

OnSuccess is being called. But no image is shown.

Code:

                        onSuccess={event => {
                          console.warn('success', event.nativeEvent);
                        }}

Output:

{"height": 100, "source": "*****", "target": 3169, "width": 100}

Sample:

a4

What about the onError block? And if you put a URL such as: https://picsum.photos/200/200?random=3, does it work?

gtokman avatar Oct 03 '24 14:10 gtokman

The example app is on the latest RN, and works. Feel free to open if you are still experiencing this issue.

gtokman avatar Nov 02 '24 20:11 gtokman