Get thumbnail from local media. Currently, it only supports for video.
$ npm install react-native-thumb --save
$ react-native link react-native-thumb
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-thumband addRNThumb.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNThumb.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
import RNThumb from 'react-native-thumb';
RNThumb.get(filepath, 100).then((result) => {
console.log(result.path); // thumbnail path
})