hhunaid / react-native-image-crop-tools

Native-ish Image Crop Tools for react native
173 stars 58 forks source link

HTTP Image sourceUrl in Android #16

Closed mazenmotaz18 closed 3 years ago

mazenmotaz18 commented 3 years ago

Hi

When I try to give the the CropView an HTTP link it works perfectly on IOS but doesn't show the image in Android

const CropViewTest = () => { const cropViewRef = useRef(); return ( <CropView sourceUrl="https://i.ytimg.com/vi/D0_S5RUV4sc/maxresdefault.jpg" style={{ width: sWidth, height: sHeight, backgroundColor: 'blue' }} ref={cropViewRef} onImageCrop={res => console.warn(res)} keepAspectRatio aspectRatio={{ width: 16, height: 9 }} /> ); };

note : the local urls works fine with both platforms

hhunaid commented 3 years ago

The library doesn't support remote images. It working in iOS is merely coincidental. If you want to crop a remote image please download it first using RNFetchBlob and then pass the local file path to it. Supporting remote images directly is a somewhat complicated task and out of scope for this project.

hasibjaan commented 3 years ago

it is complicated