-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Using an Image within the render function of a View causes the render process crash #2064
Comments
I am facing the same issue. I am unable to render dynamic image. Have you found the solution? |
@pganster any alternative library that might work better for such scenario? |
@ZabeehUllah You can try working with pdfjs, which react-pdf uses underneath. But I have no idea whether this use case is possible or not with that library. I ended up displaying the image on every page. |
Okay, I will give it a try. Thank you anayway. |
Describe the bug
Using
<Image />
within therender()
function of aView
causes the render process to crash and the following error message is shown:Error: TypeError: Cannot read properties of undefined (reading 'width')
.To Reproduce
<View render={() => <Image src="/images/quijote1.jpg" />} />
In this REPL you can see the crash in action.
Expected behavior
The rendering should not crash and the image should be rendered. I'm using the render function, so I can render an image on every page except on the first page.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: