How a Image component showing by a absolute local path
See original GitHub issueI developed a customized image component to download the online image and saved to a local file. I can not find a way to show this local file by Image component. I am sure these file downloaded successfully, because I can open them. I have tried the following ways: #1)
<Image source={{isStatic:true, uri:'file:///Users/jay/Library/Developer/CoreSimulator/Devices/00520C5F-1307-427E-AA55-9E1E020B2EFB/data/Containers/Data/Application/522D5404-A2EF-4117-A768-CF63A6A3EE8F/Library/Caches/6ea32f8825c207ec582ad684ac6a3494'}} style={imageStyle} />
#2)
<Image source={{isStatic:true, uri:'/Users/jay/Library/Developer/CoreSimulator/Devices/00520C5F-1307-427E-AA55-9E1E020B2EFB/data/Containers/Data/Application/522D5404-A2EF-4117-A768-CF63A6A3EE8F/Library/Caches/6ea32f8825c207ec582ad684ac6a3494'}} style={imageStyle} />
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (3 by maintainers)
@facebook-github-bot stack-overflow
At least on iOS I had to add an ‘.png’ to my local file when it did not contain a suffix.