Closed himanshi7046 closed 2 years ago
<Crop source={{ uri: 'http://picsum.photos/200/100' }} width={SCREEN_WIDTH} height={SCREEN_WIDTH} cropArea={{ width: SCREEN_WIDTH / 1.3, height: SCREEN_WIDTH / 1.3 }} onCrop={(cropCallback) => (crop = cropCallback)} />
hey @himanshi7046,
the issue you are facing is because of http
, the following snippet works. make sure you set allow insecure url config in your android manifest.
<Crop
source={{
uri: 'https://images.unsplash.com/photo-1627942152443-2c0defc72bb5?ixid=MnwxMjA3fDB8MHxlZGl0b3JpYWwtZmVlZHwzfHx8ZW58MHx8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60',
}}
width={SCREEN_WIDTH}
height={SCREEN_WIDTH}
cropArea={{width: SCREEN_WIDTH / 1.3, height: SCREEN_WIDTH / 1.3}}
onCrop={cropCallback => (crop = cropCallback)}
/>
Null is not an object( evaluting 'RNImageSize.getSize') error
and added android:usesCleartextTraffic="true" in android manifest
@himanshi7046 you are using redirected url, it won't work. you need to use the final url.
I got following image url by visiting the url you mentioned and it works. https://i.picsum.photos/id/652/200/100.jpg?hmac=FHOGj_uJexMz6mmMNShTa6x_T5-flvAs--cj5Ip0sTU
@himanshi7046 you are using redirected url, it won't work. you need to use the final url.
I got following image url by visiting the url you mentioned and it works. https://i.picsum.photos/id/652/200/100.jpg?hmac=FHOGj_uJexMz6mmMNShTa6x_T5-flvAs--cj5Ip0sTU
Still having the same issue can you please check it before reply
make a reproducible repo, I will check it out
@himanshi7046 need more info to know why its crashing. without reproducible repo or crash logs I won't be able to help.
are you using npm@7 then check issue #3.
Happy to help resolve your issue. It is fully compatible with remote images.
can you provide a reproducible code or share uri format