I'm using react-native-paper
to develop my application's UI.
I want to show an image in the Card
component of react-native-paper, using Card.Cover
.
The image is shown normally when I use the debug apk, but it doesn't load when I use the release apk.
Below is my component and the image I'm trying to load:
const image = {
name: 'Some Test Image',
uri: 'http://www.memoriarondonense.com.br/public/timthumb.php?w=780&src=http://www.memoriarondonense.com.br/public/upload/calendario-historico/7e6c713365c50ec0fd6bfada96a1f034.jpg&m=img/65.png'
};
<Card style={{margin: '2%'}}>
<Card.Cover
source={image.uri.includes('.pdf') ? require('../../../../assets/pdf-logo.png') : {uri: image.uri}}
/>
</Card>