react-pdf
react-pdf copied to clipboard
Not Able to Show Image in Generated PDF in React-PDF.
I tried many different methods to show the image the in the generated pdf file using React-PDF, but none of them worked for me.
Same here.
Nothing works.
In fact the html seems to be rendering an <image />
tag instead of an <img />
, that's probably why, as that's not valid.
It works fine for me. Which file formats do you use? Only JPEG
and PNG
are supported.
If the format is correct, do you use images, that can be accessed from any host?
Please provide the image you have issues with and a way to replicate this
i had issue with jpeg/jpg, while png works with Image and img component. Seems like data stream from jpeg is much different from png and on opening pdf it can't read it
tested on webp, not working same way