vault-development / react-native-svg-uri

Render SVG images in React Native from an URL or static file
850 stars 334 forks source link

Network type failed error when load from local file #155

Open sinhpn92 opened 5 years ago

sinhpn92 commented 5 years ago

I have got Network request failed when load local file.

Implementation:

<SvgUri
                    style={{
                        position: 'absolute',
                        top: -1,
                        left: 0,
                        right: 0,
                        alignItems: 'center'
                    }}
                    source={require('../../../resources/images/footer_bg.svg')}
                    width={width}
                    height={16}
                    fill={this.props.backgroundColor}/>

This issue has been in production/release build.

Have any suggest to solve this issue?

fniwes commented 5 years ago

AFAIK it is a current documented limitation. Maybe https://github.com/target/react-native-svg-parser will be a better fit for your need.