Add Product Images to WooCommerce Emails

We’ll need to use the woocommerce_email_order_items_table filter

Let’s first enable product images within our email order items template. We can do so my taking the data passed into this filter and returning it, but changing the show_image value to true instead with this snippet (in a custom plugin or functions.php):

// Edit order items table template defaults
function sww_add_wc_order_email_images( $table, $order ) {
	$template = $plain_text ? 'emails/plain/email-order-items.php' : 'emails/email-order-items.php';
	wc_get_template( $template, array(
		'order'                 => $order,
		'items'                 => $order->get_items(),
		'show_download_links'   => $show_download_links,
		'show_sku'              => $show_sku,
		'show_purchase_note'    => $show_purchase_note,
		'show_image'            => true,
		'image_size'            => $image_size
	) );
	return ob_get_clean();
add_filter( 'woocommerce_email_order_items_table', 'sww_add_wc_order_email_images', 10, 2 );

When this code is used, a 32px by 32px product image is automatically inserted in the order items table with WooCommerce emails: