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.
{% 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
- In your Shopify admin, go to Settings > Shipping and delivery.
- Scroll to the Documents section and click your packing slip template.
- Make the change in the code editor (or paste a template from the builder).
- Click Preview, pick a real order to check it, then click Save.
More packing slip how-tos
- How to show the SKU on a Shopify packing slip
- How to print personalization and custom options on a Shopify packing slip
- How to print the gift message or order note on a Shopify packing slip
- How to add your logo to a Shopify packing slip
- How to add your return policy to a Shopify packing slip
- Adding product descriptions to a Shopify packing slip (and what to do instead)
- How to add a QR code to a Shopify packing slip
- How to customize your Shopify packing slip template
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.