Won't display assets-library URIs on iOS
See original GitHub issueUsing 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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:7
- Comments:24 (12 by maintainers)
Top Results From Across the Web
Can't show Image in React Native - Stack Overflow
See Can't show Image by URI in React Native iOS Simulator ... node_modules/react-native/Libraries/Image/RCTUIImageViewAnimated.m.
Read more >Image Gallery — Sample Apps Tutorials - Apple Developer
Retrieve and display images from an asset catalog or a photo library. Welcome to the Image Gallery app. This walkthrough shows how to...
Read more >Image does not display in Mobile apps & IE
To test this issue, I create an app based on SharePoint Online list which has an image column. the URL of images come...
Read more >MediaLibrary - Expo Documentation
Otherwise, your app won't have access to the old album directory and expo-media-library won't be able to add new assets to it. However,...
Read more >Images - React Native
Static Image Resources. React Native provides a unified way of managing images and other media assets in your Android and iOS apps. To...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve some researched about this issue and conclude it’s
SDWebImage
’s problem. because they does not supportPHAsset
which is can handleassets-library
protocol.Please check below comments.
react-native-fast-image
is currently usingSDWebImage@4.2.2
andSDWebImage@5.x
is stillbeta
yet. (I found current version throughPodfile.lock
but not sure)However ReactNative’s
Image
is supportingassets-library
. they have logic forassets-library
not likeSDWebImage@4.x
’s local image handling logic which always returnsnil
aboutassets-library
image.I think this should be supported by implementing own assets-library handling or upgrading
SDWebImage@5.x
which 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: