Cannot render an Image component
See original GitHub issue| -------------------------------------------------------------------------------------------------
Reporting a bug or issue |
---|
Expected behavior:
Rendering an Image component should work. Going to post the reproducible test case here to make it clear:
function Document() {
return (
<View style={{ width: 500, height: 500, backgroundColor: 'blue' }}>
<Image
source={{
uri: 'http://localhost:8080/svg/image.png',
width: 500,
height: 500
}}
/>
</View>
);
}
When I add the Image
tag, it breaks. I originally thought it was because I was trying to render an SVG, but I tried it with a PNG too and still the same error.
Observed behavior:
This error happens:
The URL definitely is valid.
How to reproduce:
Run the above code and change the URI to a somewhere that works for you (it’s localhost right now).
Sketch version:
43.2
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Cannot Render Image from API - Stack Overflow
You are getting array of image in member object. Which is also stringified version, you need to parse it to use further. You...
Read more >cannot-render-component-images-in-component-when-using-or ...
VS Code's tsserver was deleted by another application such as a misbehaving virus detection tool. Please reinstall VS Code. Manage Extension.
Read more >How to Render Images in a React App | by Carlie Anglemire
I found using require() useful when I wanted to render an image dynamically instead of hard-coding the file path.
Read more >react-lazy-load-image-component - npm
React Component to lazy load images using a HOC to track window scroll position.. Latest version: 1.5.6, last published: 2 months ago.
Read more >Basics of rendering and exporting in After Effects CC
The rendering of a frame is the creation of a composited two-dimensional image from all the layers, settings, and other information in a ......
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
Can you try doing npm install react-sketchapp@next? I need to publish a real version soon 🙏
On Oct 12, 2017 9:09 AM, “Mike Austin” notifications@github.com wrote:
This is already fixed: https://github.com/airbnb/react-sketchapp/blob/1ebe6936e066539a0cf10d5029b54274978683a6/src/jsonUtils/hacksForJSONImpl.js#L165-L168. Make sure you are using the latest version of
react-sketchapp