bamlab / react-native-image-resizer

🗻 Resize local images with React Native
MIT License
1.59k stars 338 forks source link

Issue 328 ios fix image loading using uri or path #381

Closed taboulot closed 12 months ago

taboulot commented 12 months ago

Problem

This fix the issue #328. iOS was only accepted uriusing scheme file://. This is a regression from version < 3.x.x.

Solution

The solution was to use the React-Native url converter & image loader in order to handle both path & uri (with several protocol/scheme).

Test

This PR also add several image sources in the example application using:

ios android
New arch OFF https://github.com/bamlab/react-native-image-resizer/assets/9041221/2813ed1c-7929-45f1-9464-336a24f989c0 https://github.com/bamlab/react-native-image-resizer/assets/9041221/c519f3b9-e297-45e0-bd8b-1e6bbfe13c39
New arch ON https://github.com/bamlab/react-native-image-resizer/assets/9041221/cdd72618-9cca-44ac-a9b0-8cd2a92fd768 https://github.com/bamlab/react-native-image-resizer/assets/9041221/4b2c5f8a-3edd-4ad0-81f9-6c4daa9d4d5f