First of all, the image cannot be displayed if it is not wrapped by PDFViewer, secondly, please check if there is an error in the styling, in my case, the image is not visible because I gave the wrong styling to the font family (I wrote 'Times New Roman' instead of ' Times-Roman')

Then, to access an image not coming from a url, Bansaj's answer is very correct, but not clear enough for a front end person like me. So the meaning of 'using images from the same domain' is that we have to store our images in the public folder and not in the src folder, so that we can access the images even via url.

For example, in my case on localhost, I have a smile.jpg image in the public/ folder. We can access the image at localhost:3000/smile.jpg.

Then, to access smile.jpg in the react-pdf 's Image, we can do it like this

<Image src="http://localhost:3000/smile.jpg" />

Or

<Image src={window.location.origin + "/smile.jpg"} />

Correct me if wrong :)

Answer from Yusuf Syam on Stack Overflow
🌐
GitHub
github.com › diegomura › react-pdf › issues › 2639
ReactPDF.Image is not rendering some images · Issue #2639 · diegomura/react-pdf
February 14, 2024 - Describe the bug ReactPDF.Image is not rendering some images like the below image. there's no console error. I confirmed that ReactPDF.Image is rendering other jpeg files or png. To Reproduce I've ...
Published   Feb 14, 2024
🌐
GitHub
github.com › diegomura › react-pdf › issues › 1736
Image not rendering in react-pdf? · Issue #1736 · diegomura/react-pdf
March 2, 2022 - Here I am facing problem with rendering image. This is a tricky problem. When I put this url- https://jobsicle.org/images/jobseekers/16462432893850.jpg it do not show the image like flowing.
Published   Mar 02, 2022
🌐
React-pdf
react-pdf.org › components
React-pdf
Easy and declarative way of getting document's blob data without showing it on screen.
🌐
GitHub
github.com › diegomura › react-pdf › issues › 578
Local image not rendering · Issue #578 · diegomura/react-pdf
February 17, 2019 - Describe the bug I am trying to get image from my local path, but the image is not showing in pdf. I believe it should be simple path defination, but tried with allowDangerousPaths in my react proj...
Published   Apr 20, 2019
🌐
npm
npmjs.com › package › @react-pdf › image
react-pdf/image
Parses the images in png or jpeg format for react-pdf document. Latest version: 3.0.3, last published: 7 months ago. Start using @react-pdf/image in your project by running `npm i @react-pdf/image`. There are 12 other projects in the npm registry using @react-pdf/image.
      » npm install @react-pdf/image
    
Published   Mar 03, 2025
Version   3.0.3
Author   Diego Muracciole
🌐
GitHub
github.com › diegomura › react-pdf › issues › 929
Issue rendering images via <Image> component · Issue #929 · diegomura/react-pdf
June 18, 2020 - I have been unable to correctly load images via the component in React PDF. I had issue locally in my code but have also been able to replicate the same issue on the image test page https://react-pdf.org/repl?example=images This works an...
Published   Jun 18, 2020
🌐
Stack Overflow
stackoverflow.com › questions › 78483615 › react-pdf-dont-show-image
reactjs - React Pdf don't show image - Stack Overflow
@KJ,standard IMG tag, if you insert the path to the image or data:image/png;base64 into it, then everything is shown. And the component for displaying pictures that @react-pdf/renderer provides, it does not display a single picture.
🌐
npm
npmjs.com › package › react-pdf
react-pdf - npm
Warning: Unable to decode image "img_p0_1": "JpxError: OpenJPEG failed to initialize". then you would also need to include wasm directory in your build and tell React-PDF where it is.
      » npm install react-pdf
    
Published   Oct 09, 2025
Version   10.2.0
Author   Wojciech Maj
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 78138766 › using-pdf-react-renderer-images-do-not-be-displayed-when-downloaded
reactjs - Using PDF React Renderer, Images do not be displayed when downloaded - Stack Overflow
also the issue only happen in JPEG image? ... The cause of the issue is related to this.bits , it became undefined, it is related to the replacement of jpeg-exif into jay-jpeg -> fix: replace jpeg-exif with jay-peg #2591. We can use @react-pdf/[email protected] as a file import in package.json (make sure to remove @react-pdf/renderer) then run yarn install
🌐
Reddit
reddit.com › r/reactjs › react pdf is not letting me render image
r/reactjs on Reddit: React PDF is not letting me render Image
March 11, 2023 -

So I'm able to pass in a react component render it to a static markup and pass it to a the document component which renders as a pdf - in one of the components I get the url from an API endpoint and I pass it as src to an Image in one of the components - but keeps failing to render it just prints a blank space - can anyone please help me fix this I'm stuck for a long time

🌐
GitHub
github.com › diegomura › react-pdf › issues › 2651
Image component fails to render certain images, whereas the regular <img /> tag does render them · Issue #2651 · diegomura/react-pdf
February 18, 2024 - Upon attempting to render the images, I saw that it takes up a certain area in the PDF space, but it does not actually render that image. This behaviour is consistent across multiple attempts. To debug the issue, I pasted the Base64 containing the image into a React playground using a regular <img /> tag, and it appeared and functioned correctly.
Published   Feb 18, 2024
🌐
Lightrun
lightrun.com › answers › diegomura-react-pdf-local-image-not-rendering
Local image not rendering
See https://react-pdf.org/components#source-object Read more comments on GitHub > ... Best way to load local images in react is as follows ... anywhere from the project, by just giving '/path_to_image' and no need...Read more > ... How to fix image not showing in an HTML page ·
🌐
GitHub
github.com › wojtekmaj › react-pdf › issues
wojtekmaj/react-pdf
Display PDFs in your React app as easily as if they were images. - wojtekmaj/react-pdf
Author   wojtekmaj
🌐
GitHub
github.com › wojtekmaj › react-pdf
GitHub - wojtekmaj/react-pdf: Display PDFs in your React app as easily as if they were images.
Warning: Unable to decode image "img_p0_1": "JpxError: OpenJPEG failed to initialize". then you would also need to include wasm directory in your build and tell React-PDF where it is.
Starred by 10.7K users
Forked by 981 users
Languages   TypeScript 94.3% | CSS 5.6% | HTML 0.1%
🌐
GitHub
github.com › diegomura › react-pdf › issues › 2842
react-pdf not rendering images correctly during pdf.(<Document>).toBlob() · Issue #2842 · diegomura/react-pdf
March 21, 2024 - return ( <PDFViewer width={'100%'} height={'700'} showToolbar={true}> <MyDocumentPdf json={json} /> </PDFViewer> ); Until this point the code should work. Images should rendered on the PDF. Now instead of using step 3, we need to convert PDF to base64: import { pdf } from '@react-pdf/renderer'; import PdfDocument from '/src/components/ReportPage/pdf/PdfDocument'; const MyReport = ({vehicleData}) => { return ( <PdfDocument vehicleData={vehicleData} /> ); }; const blobToBase64 = (blob) => { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.onerror = reject; reader
Published   Aug 13, 2024
🌐
GitHub
github.com › diegomura › react-pdf › issues › 516
image cant be loaded from firebase · Issue #516 · diegomura/react-pdf
Describe the bug I cannot load images from my firebase account to the pdf. only blankspace is shown Expected behavior Image should render Snippet const MyDocument =( { let url = data.imageURL re...
🌐
Lightrun
lightrun.com › answers › diegomura-react-pdf-issue-rendering-images-via-image-component
Issue rendering images via <Image> component
I have been unable to correctly load images via the component in React PDF. I had issue locally in my code but have also been able to replicate the same is...
🌐
GitHub
github.com › diegomura › react-pdf › issues › 2656
Image rendering broken for some image since 3.2.0 · Issue #2656 · diegomura/react-pdf
December 23, 2023 - Describe the bug We are using react-pdf with 3.1.7. After upgrading @react-pdf/renderer to 3.3.8 we noticed image rendering was broken in some cases. We identified that it broke between the version 3.1.7 and 3.2.0. To Reproduce Steps to ...
Published   Feb 26, 2024
🌐
GitHub
github.com › diegomura › react-pdf › issues › 2387
Not Able to Show Image in Generated PDF in React-PDF. · Issue #2387 · diegomura/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.