Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dbasedow/react-native-webp
https://github.com/dbasedow/react-native-webp
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dbasedow/react-native-webp
- Owner: dbasedow
- License: mit
- Created: 2016-01-17T15:10:08.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-08T07:36:36.000Z (over 7 years ago)
- Last Synced: 2024-08-15T00:20:10.818Z (6 months ago)
- Language: C
- Size: 3.98 MB
- Stars: 68
- Watchers: 3
- Forks: 21
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-native - react-native-webp ★56 - react-native-webp adds support for WebP images for react-native components. (Components / Utils & Infra)
- awesome-react-native - react-native-webp ★56 - react-native-webp adds support for WebP images for react-native components. (Components / Utils & Infra)
- awesome-react-native - react-native-webp ★56 - react-native-webp adds support for WebP images for react-native components. (Components / Utils & Infra)
- awesome-react-native-ui - react-native-webp ★29 - react-native-webp adds support for WebP images for react-native components. (Components / Utils & Infra)
- awesome-react-native - react-native-webp ★56 - react-native-webp adds support for WebP images for react-native components. (Components / Utils & Infra)
README
react-native-webp adds support for WebP images for react-native components.
# Installation
1. ```npm install react-native-webp --save```
2. ```rnpm link``` (or manually add module to your project)
3. Open your project in xcode
4. Right click your project root and select "Add Files to ..."
5. Select "WebP.framework" and "WebPDemux.framework" from node_modules/react-native-webp/ and click "OK"
6. Select your Target
7. Select "Build Settings"
8. Add "$(SRCROOT)/../node_modules/react-native-webp" to the "Framework Search Path"# Usage
You don't have to do anything other than use WebP images. This project adds a custom RCTImageDataDecoder to your project, so all react-native components should be able to use WebP files. If you are using custom components that work with UIImages directly (without using RCTImageDataDecoder) you will have to change that code.