Packing slip guide

How to add product images to your Shopify packing slip

Build a packing slip with images

The code

Put this inside {% for line_item in line_items_in_shipment %}, where you want the thumbnail. The size in img_url is the image Shopify serves; the CSS width controls how big it prints.

Product thumbnail
{% if line_item.image != blank %}
  {{ line_item.image | img_url: '160x160' | img_tag: line_item.title, 'ps-thumb' }}
{% endif %}

<style>
  .ps-thumb { width: 64px; height: 64px; object-fit: cover; }
</style>

Why images sometimes don’t show

Packing slips only load images from Shopify’s own CDN (cdn.myshopify.com). Product images come from there, so line_item.image works. An image URL from another site (an image host, a QR or barcode generator) is filtered out and prints as nothing.

If a product has no image, line_item.image is blank. The if check above keeps the layout from leaving an empty box.

Where to paste it

  1. In your Shopify admin, go to Settings > Shipping and delivery.
  2. Scroll to the Documents section and click your packing slip template.
  3. Make the change in the code editor (or paste a template from the builder).
  4. Click Preview, pick a real order to check it, then click Save.

More packing slip how-tos

Based on Shopify’s packing slip variable reference. Not affiliated with, endorsed by, or sponsored by Shopify Inc. Shopify is a trademark of Shopify Inc.