react-native-webp
react-native-webp copied to clipboard
How to use it
I replaced the png files to webp, and get error TypeError: unsupported file type
How to use it?
@isair @priezz @dbasedow
hi, u can try as follow:
- 1、
npm install react-native-webp --save - 2、
react-native link - 3、Right click your project root and select "Add Files to ..." Select "WebP.framework" from xxxUProject/node_modules/react-native-webp/ and click "OK"
- 4、Select your Target Project -> Select "Build Settings"
Add "$(SRCROOT)/../node_modules/react-native-webp" to the
Header Search Path
Hi @jsntghf ,
The error is because [email protected] can't understand some webp format. See here.
Upgrade react-native to at least 0.48 should solve TypeError: unsupported file type.
I tested in [email protected] which failed, and [email protected] which succeeded.