Is there a generic way of changing the thumbnail of a line item?

Topic summary

Goal: Display a custom preview/thumbnail for each cart line item without modifying individual themes.

  • Known workaround: Store an image URL in line item properties (custom fields on a cart item) and edit theme Liquid templates to render it. Drawback: depends on each theme’s structure and requires ongoing maintenance across themes.
  • Limitation: The Cart API does not appear to support directly setting a line item image, raising the need for a theme-agnostic or API-level solution.
  • Additional requirement raised: Ensure a custom-generated image stays associated with the line item beyond checkout (e.g., in order details, fulfillment emails/notifications, and order history).

Key terms: “line item properties” = metadata attached to a cart item; “Liquid” = the theme templating language.

Status: No solution or official method confirmed. Open questions remain about a generic, theme-independent approach and whether custom images can persist through the entire order lifecycle via platform-supported APIs.

Summarized with AI on January 1. AI used: gpt-5.

Hey everyone!

We are currently building an app for which we need a custom preview image of the product on the line item within the cart. Now I know I can do it with line item properties and then change the theme liquid files to use the URL from the properties. But that requires us to know the structure of the theme and change it. Which is not ideal as it requires us to keep extending it for new themes. The cart API also doesn’t seem to support setting the image for some reason. Is there a more generic way to change the thumbnail that does not depend on the theme?

Thanks for any help!

1 Like

Trying to achieve the same for my shop here:
To attach custom-generated images to cart line-items. But then, won’t we also like to have our custom image stay associated with that line item beyond the checkout process (fulfillment notifications, order history…)? I wonder if that is at all possible.