Title: Image Wrapper for thumbnails
Last modified: August 31, 2016

---

# Image Wrapper for thumbnails

 *  [Dragos Cristache](https://wordpress.org/support/users/dragoscristache/)
 * (@dragoscristache)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/image-wrapper-for-thumbnails/)
 * Is there any way to put the product thumbnail (that appears on a catalog page)
   in a wrapper?

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

 *  [James Koster](https://wordpress.org/support/users/jameskoster/)
 * (@jameskoster)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/image-wrapper-for-thumbnails/#post-7050232)
 * Yup, it’s possible. You’ll need two custom functions which contain the wrapping
   markup. They should be hooked into `woocommerce_before_shop_loop_item_title` 
   with the appropriate priorities. You can see [here](https://github.com/woothemes/woocommerce/blob/master/templates/content-product.php#L66)
   that the thumbnail is hooked in with a priority of 10. So try something like 
   5 for your opening tag and 15 for the closing tag.
 * Cheers
 *  Thread Starter [Dragos Cristache](https://wordpress.org/support/users/dragoscristache/)
 * (@dragoscristache)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/image-wrapper-for-thumbnails/#post-7050291)
 * Could you post a code example? Thanks!
 *  [James Koster](https://wordpress.org/support/users/jameskoster/)
 * (@jameskoster)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/image-wrapper-for-thumbnails/#post-7050304)
 *     ```
       add_action( 'woocommerce_before_shop_loop_item_title', 'jk_image_wrapper_open', 5 );
       add_action( 'woocommerce_before_shop_loop_item_title', 'jk_image_wrapper_close', 15 );
   
       function jk_image_wrapper_open() {
       echo '<div class="img-wrap">';
       }
   
       function jk_image_wrapper_close() {
       echo '</div>';
       }
       ```
   
 * Give that a try.

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

The topic ‘Image Wrapper for thumbnails’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/storefront/4.6.2/screenshot.png)
 * Storefront
 * [Support Threads](https://wordpress.org/support/theme/storefront/)
 * [Active Topics](https://wordpress.org/support/theme/storefront/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/storefront/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/storefront/reviews/)

## Tags

 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)
 * [wrapper](https://wordpress.org/support/topic-tag/wrapper/)

 * 3 replies
 * 2 participants
 * Last reply from: [James Koster](https://wordpress.org/support/users/jameskoster/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/image-wrapper-for-thumbnails/#post-7050304)
 * Status: not resolved