Is it possible to have <img>s with local URIs?
See original GitHub issueDoes react-native-htmlview support <img>
tags with images local to the project?
I can’t seem to get it to work with any path, even when they work as expected when passing them to a RN <Image>
element.
So this works:
<Image source={require('../Images/logo.png')}>
but this doesn’t:
const htmlContent = `<img src="../Images/logo.png">`;
<HTMLView value={htmlContent} />
I’m getting
Failed to get size for image: …/Images/logo.png
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Embedding Local Images using Data URIs - SpiceLogic
In order to keep your inserted images, you can embed them using Base64 Data URI. Base64 Data URI allows you to get rid...
Read more >android - React Native - How to load local image using the uri ...
It works for network images but it doesn't work for local images and even it does not give any error for local images...
Read more >Requesting Multiple Images (Multi-URI) - Fresco
This option is supported only for local URIs, and only for images in the JPEG ... Only if none were found there either...
Read more >Feature request: Update image URI even though current URI ...
Currently, if the Original URIs are valid, using the Search function to direct to a new folder will not change the Replacement URIs...
Read more >Data Uris For Image Archives - Carl Boettiger
As I discussed above, I have recently experimented with hosting all images I generate on the local server, removing the dependency and archival ......
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
@pekkanikolaus at the moment it’s assumed that the resource is remote: the
{ uri: ... }
object is passed to the underlyingImage
component. That should be a fairly easy fix, so if you’d like to PR it feel free! Otherwise it’ll join the ‘nice to have’ feature list 😉I used a similar path:
But the image is too blurry