Adding uploaded images to your invoice and packing slip templates

It's possible to add the customer's uploaded images to your printable templates such as invoices and packing slips. However, Shopify's own Order Printer app doesn't support this, so you will need to use a third party app which supports showing external images on your templates, such as Order Printer Pro.

To do this, first enable the 'Add a direct link to the file' option in your UploadKit field settings:

Note that this only applies to future orders.

Then, you need to edit your invoice or packing slip template code inside your order printer app.

First, find this line in your template:

{% for line_item in line_items %}

(This line might instead be:)

{% for line_item in line_items_in_shipment %}

Before the closing {% endfor %} tag, and where you want the images to appear, paste this code in:

{% for p in line_item.properties %}
    {% if p.first contains "direct link" %}
        <p>{{ p.first }}:<br />
            <a href="{{ p.last }}"><img src="{{ p.last }}" alt="{{ p.first }}" width="80" border="0" style="width: 80px; height: auto !important;"></a>
        </p>
    {% endif %}
{% endfor %}

You can change the width 80 above if you need it larger or smaller.

You might usually place this code underneath the  {{ line_item.title }} code, but you can choose anywhere you like as long as it is between the {% for line_item... %} and {% endfor %} tags.

Still need help? Contact Us Contact Us