Webp on react-native

The React-Native documentation mentions that webp is not supported on Android, but says nothing about iOS. Out of the box, this does not work, but after installing this plugin https://libraries.io/npm/react-native-webp I can use images downloaded from the Internet.

The problem is that local files give me an error

: "{" type ": InternalError", "message": "agent-packager encountered an internal error, please check the error output in the terminal for more details"}

Unfortunately, the command "response-native log-ios" just shows the same error there.

This is how I use the webp file after installing the plugin.

<Image source={require('../../assets/icon.webp')} /> 

How can I use local .webp images for React-native iOS?

+1
source share

Source: https://habr.com/ru/post/1269788/


All Articles