<p>Try setting:</p>

<p><code>'pdfAllowRemoteImages' =&gt; true,</code></p>

<p>in your commerce.php config file.</p>

CC BY-SA 4.0
2018-07-06T02:47:41.537Z
That worked!  Stupid question but updates won't override the config file right?
biko
CC BY-SA 4.0
2018-07-06T04:18:32.037Z
No, the `commerce.php` config file you create in your `/config` directory will never be overridden. Just don't edit the config.php file in the commerce directory.
Luke Holder
CC BY-SA 4.0
2018-07-06T05:08:00.580Z
Thx.  Good thing I asked since I actually modified the core commerce/config.php which is definitely not the way to go, and didn't seem right either.  I've created a craft/config/commerce.php file now.  Thanks again!
biko
CC BY-SA 4.0
2018-07-06T02:16:46.317Z
2018-07-06T02:16:46.317Z
Luke Holder
<p>In the order template, this error shows up in the generated PDFs when adding standard JPG images.  We're running Commerce 1.2.x on PHP70.</p>

<p>It could be related to this <a href="https://github.com/dompdf/dompdf/issues/1118" rel="nofollow noreferrer">dompdf issue</a>, but how do we fix it in Craft Commerce?</p>

<plugin-craftcommerce><image><dompdf>
Commerce PDF error: Image not found or type unknown
# Commerce PDF error: Image not found or type unknown

(Asked by: username_0 on 2018-07-06)

In the order template, this error shows up in the generated PDFs when adding standard JPG images. We're running Commerce 1.2.x on PHP70.

It could be related to this [dompdf issue](https://github.com/dompdf/dompdf/issues/1118), but how do we fix it in Craft Commerce?

**Tags:** plugin-craftcommerce, image, dompdf

---

## 1 answers

### Answer by username_1 on 2018-07-06. Score: 3 | Accepted answer

Try setting:

`'pdfAllowRemoteImages' => true,`

in your commerce.php config file.

> **Comments:**
> **username_0**: That worked!  Stupid question but updates won't override the config file right?  
> **username_1**: No, the `commerce.php` config file you create in your `/config` directory will never be overridden. Just don't edit the config.php file in the commerce directory.  
> **username_0**: Thx.  Good thing I asked since I actually modified the core commerce/config.php which is definitely not the way to go, and didn't seem right either.  I've created a craft/config/commerce.php file now.  Thanks again!  

---

