Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display image from local system #12

Open
crysfel opened this issue Oct 16, 2015 · 2 comments
Open

Display image from local system #12

crysfel opened this issue Oct 16, 2015 · 2 comments

Comments

@crysfel
Copy link

crysfel commented Oct 16, 2015

Is there any way I can display an image from the local system inside of the webview? Basically I want to download some images from my server and display them on the webview, mainly to support offline mode and also performance.

@almost
Copy link
Owner

almost commented Oct 18, 2015

One way is to build a base64 data url for the image and include that as part of the HTML (or inject it in via JavaScript later)

@virgial
Copy link

virgial commented Nov 8, 2015

For those who come here after searching for a way to put local images in a react-native webview. You can put a local webpage including local images as reference in your xcode project and reference your image in the page via ./images/myimage.jpg. In other words drag and drop your webpage and image folder in your xcode project.
Hopefully it helps someone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants