Search code examples
javascriptreactjsimagereact-nativewebp

React Native WebP format Image disappearred sometimes


We’re react-native 0.64.0.

We have a problem after transformatting all images to webp in our app.

The problem is webp format image not rendering properly sometimes and only show blank area.

The problem show only iOS and I think that happens only 1% random images.

Is that anyone who experienced this problems?


Solution

  • I have the same issue after exchanging app assets from png to webp as a requirement of android showing assets over a size of 2048 pixels in a very low quality: RN 0.57.x Bundled large images have low quality when viewing using component with 1:1 AR on Android.

    I tried nearly everything to prevent this behaviour: defining fixed widths and heights per asset, adding different resizeModes, showing images after some init state, but nothing helped. The issue only occurs on iOS in release mode, very frequently - but not reproducible.

    I tried upgrading from RN 0.64.0 to 0.64.2 but without any change regarding the issue. The only workaround I could find so far is switching back to png or loading assets from web, but I don't know if thats an option for you.