phuochau / react-native-thumbnail

Get thumbnail from local media. Currently, it only supports for video.
MIT License
135 stars 104 forks source link

Height and width of 0 thumbnail result #25

Closed azanli closed 6 years ago

azanli commented 6 years ago

I'm unable to render a thumbnail image with this library. It returns a result with a path for the cached thumbnail but the height and width properties are both 0. Do these properties suggest that the image cannot be rendered? I am providing my own height and width style properties to the <Image /> itself.

azanli commented 6 years ago

Nevermind, the height and width doesn't matter. What went wrong was that I was returning the asynchronous cached path like this <Image source={{ uri: this.getThumbnail(filePath) }} /> when I should've been using state to update the component with the returned path.