How to add Images of products being purchased to Order Review part in Magento?

How to add Images of products being purchased to Order Review part in Magento?

August 18, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to add Images of products being purchased to Order Review part in Magento?

Adding Product Images to the Order Review Section in Magento

As an e-commerce developer working with Magento, one of the common requests I receive from clients is how to display product images directly within the checkout process, specifically during the order review stage.

The order review section provides a summary of the items being purchased before the customer proceeds to payment. By default, Magento only displays basic information like item name, SKU, quantity, price, and tax. The images are not included by default.

Understanding the Order Review Process

In the Magento checkout flow, the order summary is displayed using the sales_order_summary block in the checkout_index_index.xml layout file:

<block class="Magento\Checkout\Block\Cart\OrderSummary" name="sales.order(summary)" as="order_summary">
    <action method="setTemplate">
        <argument name="template" xsi:type="string">Magento_Checkout/order/summary.phtml</argument>
    </action>
</block>

The summary.phtml template is responsible for rendering the order items. By default, it only includes basic text information.

Modifying the Order Summary Template

To include product images in the order summary:

  1. Navigate to /app/design/frontend/{theme}/{package}/Magento_Checkout/templates/order/summary.phtml.

  2. Locate the foreach loop that iterates through the $block->getItems() collection.

  3. Add the following code inside this loop, where {image_url} should be replaced with your actual image URL or a helper function to generate the image URL:

<img src="{image_url}" alt="{item.name}" width="50" />
  1. If you want to use Magento’s built-in functions for the image URL, you can use something like this (assuming your product images are stored at pub/media/catalog/product):
<img src="<?= $this->helper('Magento\Catalog\Helper\Image')->init($item->getProduct(), 'product_small_image')->getUrl() ?>" alt="{item.name}" width="50" />

Updating the Order Summary Block

After updating the template, you need to ensure that the summary block is properly rendered in your layout.

If you’ve modified a core file directly (which I do not recommend), you should follow Magento’s best practices and override it using a theme or module. This ensures your changes are preserved during updates.

Testing Your Changes

Once the modifications are complete, clear your cache:

php bin/magento cache:clean

Then test your checkout process to ensure the product images appear in the order summary as expected.

Conclusion

Adding product images to the order review section in Magento involves a simple modification of the summary.phtml template file. By understanding how the checkout flow works and where these items are rendered, you can easily enhance the user experience by including visual representations of the products being purchased.

Remember, when working with core files in Magento, it’s always best to use the theme or module override approach to ensure your changes persist during updates and upgrades. This will help maintain a clean and manageable codebase over time.

For more detailed guides on Magento 2 development and checkout customization, I recommend exploring the resources available at Laravel Company. They provide comprehensive tutorials and best practices for working with this powerful e-commerce platform.

Checkout Catalog Themes Orders

Our network