Title: After adding product images
Last modified: June 3, 2022

---

# After adding product images

 *  Resolved [18kgp](https://wordpress.org/support/users/18kgp/)
 * (@18kgp)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/after-adding-product-images/)
 * Hi,
    Is it possible to change it to [https://upload.cc/i1/2022/06/03/hFmyoZ.jpg](https://upload.cc/i1/2022/06/03/hFmyoZ.jpg)
    -  This topic was modified 4 years, 2 months ago by [18kgp](https://wordpress.org/support/users/18kgp/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/)
 * (@mokshasharmila13)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/after-adding-product-images/#post-15711145)
 * Hi [@18kgp](https://wordpress.org/support/users/18kgp/),
 * It is possible to add a product image after the product name. Please add the 
   below code in your active theme’s functions.php file or using a plugin like Code
   Snippets:
 *     ```
       function add_product_image( $product_name, $item ) {
       	$product_id    = $item['product_id'];
       	$product_image = wp_get_attachment_image_src( get_post_thumbnail_id( $product_id ) );
           echo $product_name;
       	?>
       	<img src="<?php echo esc_url( $product_image[0] ); ?>" width="50" height="50" >
       	<?php
       ```
   
 * Regards,
    Moksha.
 *  Thread Starter [18kgp](https://wordpress.org/support/users/18kgp/)
 * (@18kgp)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/after-adding-product-images/#post-15711269)
 * Hi, Moksha.
 * Thanks for your reply
    but an error occurs
 *  Thread Starter [18kgp](https://wordpress.org/support/users/18kgp/)
 * (@18kgp)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/after-adding-product-images/#post-15711284)
 * I wish the product images could be independent
    [https://upload.cc/i1/2022/06/06/sECBKz.jpg](https://upload.cc/i1/2022/06/06/sECBKz.jpg)
    -  This reply was modified 4 years, 2 months ago by [18kgp](https://wordpress.org/support/users/18kgp/).
 *  [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/)
 * (@mokshasharmila13)
 * [4 years, 2 months ago](https://wordpress.org/support/topic/after-adding-product-images/#post-15711342)
 * Hi [@18kgp](https://wordpress.org/support/users/18kgp/),
 * Please add the below code in your active theme’s functions.php file or using 
   a plugin like Code Snippets:
 *     ```
       function add_product_image( $product_name, $item ) {
       	$product_id    = $item['product_id'];
       	$product_image = wp_get_attachment_image_src( get_post_thumbnail_id( $product_id ) );
             echo $product_name;
       	?>
       	<img src="<?php echo esc_url( $product_image[0] ); ?>" width="50" height="50" >
       	<?php
   
       } add_filter( 'wcdn_order_item_name', 'add_product_image', 10, 2 );
       ```
   
 * Screenshot:- [https://prnt.sc/h7pCj3J_dLw0](https://prnt.sc/h7pCj3J_dLw0)
    Let
   me know if this code is working or not?
 * Regards,
    Moksha.
    -  This reply was modified 4 years, 2 months ago by [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/).
    -  This reply was modified 4 years, 2 months ago by [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘After adding product images’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-delivery-notes/assets/icon-256x256.jpg?rev=2829362)
 * [Print Invoice & Delivery Notes for WooCommerce](https://wordpress.org/plugins/woocommerce-delivery-notes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-delivery-notes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-delivery-notes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-delivery-notes/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/)
 * Last activity: [4 years, 2 months ago](https://wordpress.org/support/topic/after-adding-product-images/#post-15711342)
 * Status: resolved