react-native-fast-image: Won't display assets-library URIs on iOS
Using CameraRoll in react native gives a URI formatted as assets-library://asset/asset.... This used to work with this library. It still works with react’s Image tag. However, this library now shows a blank image instead. Not sure which build caused it as I’m having trouble rolling back.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 8
- Comments: 24 (12 by maintainers)
I’ve some researched about this issue and conclude it’s
SDWebImage’s problem. because they does not supportPHAssetwhich is can handleassets-libraryprotocol.Please check below comments.
react-native-fast-imageis currently usingSDWebImage@4.2.2andSDWebImage@5.xis stillbetayet. (I found current version throughPodfile.lockbut not sure)However ReactNative’s
Imageis supportingassets-library. they have logic forassets-librarynot likeSDWebImage@4.x’s local image handling logic which always returnsnilaboutassets-libraryimage.I think this should be supported by implementing own assets-library handling or upgrading
SDWebImage@5.xwhich is now supporting through SDWebImagePhotosPlugin.@DylanVann Can you follow up this issue?
@r0b0t3d Did you check something documentation of SDWebImagePhotosPlugin-Memory Warning ? Which allows some customization about image loading size.
For iPhone X+ devices, the Camera pixel size is higher than 4000x 4000, so it’s better to limit the size. You can change the default image pixel size using the APIs. For example like this: