Answers.Body: <p>Have you tried to use a absolute path without the «/» at the beginning? (or actually a relative one from the webroot…) <code>&lt;img src="assets/images/site/logo.png" /&gt;</code> </p>
  
  <p>This did the trick in my case.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-08T20:23:11.327Z
Answers.LastActivityDate: 2018-08-08T20:23:11.327Z
Answers.UserDisplayName: Serafin Pazdera
Answers.Body: <p>The PDF renderer uses DOMPDF, which expects a HTML document to be supplied. See the DOMPDF documentation to see what types of images are supported.</p>
  
  <p>If you are linking images from a different domain you will need to set the commerce.php config setting of <code>pdfAllowRemoteImages</code> to true.</p>
  
  <p><a href="https://docs.craftcms.com/commerce/v2/configuration.html#pdfallowremoteimages" rel="nofollow noreferrer">https://docs.craftcms.com/commerce/v2/configuration.html#pdfallowremoteimages</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-07T18:01:05.727Z
Answers.Text: I have the pdfallowremoteimages setting already. I guess my question is where do I grab the image from? The local shop/_pdf directory or somewhere else? I am getting an "Image not found" error in the PDF so it seems like dompdf cannot locate the resource. I have tried <img src="logo.png" /> ans well as <img src="/assets/images/site/logo.png" />
Answers.UserDisplayName: David A McInnis
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-08-07T16:30:35.210Z
Answers.Text: Am also struggling with this, I have `pdfAllowRemoteImages` set to true, and have tried an absolute path to an image on the frontend website (eg https://blah) and a relative path - still getting an empty square and "image not found" error as per comment above
Answers.UserDisplayName: James Greig
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-19T17:19:17.487Z
Answers.Text: Having the same issue myself. @jamesgreig did you resolve this?
Answers.UserDisplayName: Terry Upton
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-22T09:56:43.387Z
Answers.Text: No I gave up I'm afraid @TerryUpton
Answers.UserDisplayName: James Greig
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-07T02:30:20.767Z
Answers.LastActivityDate: 2018-11-02T18:51:00.767Z
Answers.LastEditDate: 2018-11-02T18:51:00.767Z
Answers.UserDisplayName: Luke Holder
Answers.Body: <p>Also had the issue, it seems like neither the valid path nor url work, despite of the setting pdfAllowRemoteImages being adjusted.
  But you can always base64 encode the image and place that inside the src=&quot;&quot;.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-10T12:06:04.683Z
Answers.LastActivityDate: 2021-03-10T12:06:04.683Z
Answers.UserDisplayName: Len van Essen
Body: <p>How do I embed an image (PNG,SVG or JPG) into a CraftCMS Commerce 2 PDF receipt? I tried importing the svg using an includes. I tried using an img tag and referencing a local file. Nothing seems to work.</p>
  
  <p>David</p>
  
Tags: <plugin-craftcommerce><dompdf>
Title: How can I embed Image into Craft Commerce 2 PDF Receipt
ThreadText: # How can I embed Image into Craft Commerce 2 PDF Receipt
  
  (Asked by: username_0 on 2018-08-06)
  
  How do I embed an image (PNG,SVG or JPG) into a CraftCMS Commerce 2 PDF receipt? I tried importing the svg using an includes. I tried using an img tag and referencing a local file. Nothing seems to work.
  
  username_0
  
  **Tags:** plugin-craftcommerce, dompdf
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2018-08-08. Score: 2 | Accepted answer
  
  Have you tried to use a absolute path without the «/» at the beginning? (or actually a relative one from the webroot…) `<img src="assets/images/site/logo.png" />`
  
  This did the trick in my case.
  
  
  ---
  
  ### Answer by username_2 on 2018-08-07. Score: 2
  
  The PDF renderer uses DOMPDF, which expects a HTML document to be supplied. See the DOMPDF documentation to see what types of images are supported.
  
  If you are linking images from a different domain you will need to set the commerce.php config setting of `pdfAllowRemoteImages` to true.
  
  <https://docs.craftcms.com/commerce/v2/configuration.html#pdfallowremoteimages>
  
  > **Comments:**
  > **username_0**: I have the pdfallowremoteimages setting already. I guess my question is where do I grab the image from? The local shop/_pdf directory or somewhere else? I am getting an "Image not found" error in the PDF so it seems like dompdf cannot locate the resource. I have tried <img src="logo.png" /> ans well as <img src="/assets/images/site/logo.png" />  
  > **username_3**: Am also struggling with this, I have `pdfAllowRemoteImages` set to true, and have tried an absolute path to an image on the frontend website (eg https://blah) and a relative path - still getting an empty square and "image not found" error as per comment above  
  > **username_4**: Having the same issue myself. @username_3 did you resolve this?  
  > **username_3**: No I gave up I'm afraid @username_4  
  
  ---
  
  ### Answer by username_5 on 2021-03-10. Score: 1
  
  Also had the issue, it seems like neither the valid path nor url work, despite of the setting pdfAllowRemoteImages being adjusted.
  But you can always base64 encode the image and place that inside the src="".
  
  
  ---
  
  