diegomura / react-pdf

📄 Create PDF files using React
https://react-pdf.org
MIT License
14.48k stars 1.14k forks source link

Not Able to Show Image in Generated PDF in React-PDF. #2387

Open Yassyn90 opened 11 months ago

Yassyn90 commented 11 months ago

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.

MartinDawson commented 10 months ago

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.

Wegi commented 10 months ago

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?

diegomura commented 5 months ago

Please provide the image you have issues with and a way to replicate this

marsidorowicz commented 5 months ago

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