Insert images

There’s two ways of inserting images in the PDF template: directly in the template settings fields (the footer for example) or in a custom template. Note that JPG is almost always preferable over PNG, because it is much lighter to process for the server.

You can enter plain HTML in the template settings, so if you know the url to the image, you can simply add an <img> tag:

<img src="" style="height: 6mm;">
<span style="color: green;">Please consider the environment before printing this document</span>

Not all servers allow url images though (note that this is different from regular webpages, everything is downloaded to the server first!). If this is the case on your site (you can see this on the Status tab of the settings), you can use the full server path to the image instead.

<img src="path/to/your/site/root/images/dont_print_emails.jpg" style="height: 6mm;">

If you have created a custom template, you can achieve the same thing without having to figure out the server path. Simply add the image to your pdf template folder and use the following code snippet:

<img src="<?php echo $wpo_wcpdf->export->template_path; ?>/image.jpg"/>