react-native-fast-image: Some images are not showing.

First, Below is showing well.

<FastImage
              style={s.image}
              source={{
                uri: 'https://unsplash.it/400/400?image=1',
                headers:{ Authorization: 'someAuthToken' },
                priority: FastImage.priority.normal,
              }}
              resizeMode={FastImage.resizeMode.stretch}
            />

But, Below is not showing.

<FastImage
              style={s.image}
              source={{
                uri: 'https://s3.ap-northeast-2.amazonaws.com/zzim-app-images/intro/180529_1.png',
                headers:{ Authorization: 'someAuthToken' },
                priority: FastImage.priority.high,
              }}
              resizeMode={FastImage.resizeMode.stretch}
            />

Why can’t I see any image? Can’t I load image from s3?

So I test to upload first image in s3.

  1. Download : “https://unsplash.it/400/400?image=1
  2. Uri change : : “https://s3.ap-northeast-2.amazonaws.com/zzim-app-images/test.jpeg)”

But it’s not showing too.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 7
  • Comments: 39 (3 by maintainers)

Most upvoted comments

@kkotkkio https://github.com/DylanVann/react-native-fast-image/issues/219

@jedashford just because the maintainer has other stuff to do than responding to the third duplicate of an issue that does not mean the project is dead…

And I try to use <Image> of react-native. It’s works. The problem is from to use FastImage and S3 Image.

add android:usesCleartextTraffic=“true” in AndroidManifest.xml work for me, maybe check date time of your device.

  <application
        ...
        android:usesCleartextTraffic="true"
        ...>
        ...
    </application>

I had the exact same issue with React-Native 0.60+

I was trying to load images from S3 bucket url (which were public) It seems that resizing the image with the following code, made it work:

resizeMode={FastImage.resizeMode.contain}

Here is the code used, before: <FastImage style={styles.image} source={{ uri: item.src, }} /> and after:

<FastImage style={styles.image} source={{ uri: item.src, }} resizeMode={FastImage.resizeMode.contain} />

@0x01001 what do you mean by checking date and time ?

a cause of this problem can be wrong date time of the device, it’s about SSL validation failed. when I change update automatic time zone it’s work.

my log:

12-16 22:14:50.118  5821  5821 W Glide   : class com.bumptech.glide.load.engine.GlideException: Failed to load resource
12-16 22:14:50.118  5821  5821 W Glide   : There was 1 cause:
12-16 22:14:50.118  5821  5821 W Glide   : javax.net.ssl.SSLHandshakeException(Chain validation failed)
12-16 22:14:50.118  5821  5821 W Glide   :  call GlideException#logRootCauses(String) for more detail
12-16 22:14:50.118  5821  5821 W Glide   :   Cause (1 of 1): class com.bumptech.glide.load.engine.GlideException: Fetching data failed, class java.io.InputStream, REMOTE
12-16 22:14:50.118  5821  5821 W Glide   : There was 1 cause:
12-16 22:14:50.118  5821  5821 W Glide   : javax.net.ssl.SSLHandshakeException(Chain validation failed)
12-16 22:14:50.118  5821  5821 W Glide   :  call GlideException#logRootCauses(String) for more detail
12-16 22:14:50.118  5821  5821 W Glide   :     Cause (1 of 1): class javax.net.ssl.SSLHandshakeException: Chain validation failed
12-16 22:14:50.121  5821  5821 I Glide   : Root cause (1 of 1)
12-16 22:14:50.121  5821  5821 I Glide   : javax.net.ssl.SSLHandshakeException: Chain validation failed

I think this project is dead, no response to any thread.

I had issues with some images not showing. Changing the cache mode to web fixed it for me.

<FastImage
  style={{
    width: imageSize,
    height: imageSize,
    borderRadius: borderRadius,
  }}
  source={{
    uri: imageUrl,
    cache: FastImage.cacheControl.web
  }} 
/>

For my case some images were http, not https, and were not shown. This fixed it:

<FastImage
   source={{uri: myUri.replace('http:', 'https:)}} />

add android:usesCleartextTraffic=“true” in AndroidManifest.xml work for me, maybe check date time of your device.

  <application
        ...
        android:usesCleartextTraffic="true"
        ...>
        ...
    </application>

After setting the device’s date time to my local time… everything works fine

same issue

I’m writing this here because when searching for a solution I found this issue, so this could help someone…

I was experiencing a similar problem, some images were not showing on iOS only… I found out that those images (even though extension was jpg) were in WEBP format, and SDWebImage doesn’t support WEPB for default, but can be added using a pod (#476)

Hi, I just upgraded version to lastest (5.2.0) and it work well.

Hint: If you convert the S3 image to base64 and pass to FastImage it seems to work