react-native-expo-image-cache icon indicating copy to clipboard operation
react-native-expo-image-cache copied to clipboard

Optional fallback option

Open vtsybulin opened this issue 5 years ago • 1 comments

Added optional fallback option in case CacheManager fails to download the main image with error response code different from 200. Fallback should be provided as a local asset module.

@wcandillon Hi there. Thanks for the awesome plugin! Being using it a lot. However, for the current project, I faced an issue: when the image URL is broken or there is a network issue, blurry preview keeps hanging forever. I thought would be good to be able to fall back to some default thumbnail in this case. Let me know what you think. Thanks

Example of usage:

const fallback = require('...'); ... <Image {...{ preview, uri }} fallback={fallback} />

vtsybulin avatar Aug 20 '19 14:08 vtsybulin

@wcandillon Hi. Any feedback on this? Thanks.

vtsybulin avatar Nov 20 '19 10:11 vtsybulin