question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:

image

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:closed
  • Created 6 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jemgoldcommented, Oct 12, 2017

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:

https://www.npmjs.com/package/react-sketchapp “0.12.1 is the latest of 26 releases”

So you recommend grabbing the latest from GitHub instead of using npm? When do you think there will be another npm release? BTW, this is a great tool and we hope to use it and promote it.

examples/profile-cards/package.json:

“dependencies”: { “react”: “^15.4.2”, “react-sketchapp”: “^0.12.0”, “react-test-renderer”: “^15.4.2” }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/airbnb/react-sketchapp/issues/101#issuecomment-336186081, or mute the thread https://github.com/notifications/unsubscribe-auth/AAkHGwilrIziqURq39sx-CZPWmw5YSXcks5srjnBgaJpZM4Nd8la .

1reaction
mathieudutourcommented, Oct 12, 2017
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found