Shopify Product Images Of An Order Items

- 1 answer

I want to show the images of products in an order for the plugin I'm developing. But with the response returned for orders(from shopify admin API), in it line_items doesn't contain a product object or any other object that have the link for shopify cdn link of a product image, but the product id.

What I'm planning now is to call the admin api again with product id to get images which looks costly as I have to do it to all the items in an order and do that for all orders.

My question is whether any other way to derive the cdn link for product image given the product id or what could be the best approach for this?

Thanks in advance.



Let check the shopify Product API Docs. You can get a list of products by Product API, which is not costly.

Get a list of specific products

GET /admin/products.json?ids=632910392,921728736