WooCommerce - excelling eCommerce
[resolved] Filters to product images and thumbnails not work (3 posts)

  1. prolab
    Posted 2 years ago #

    I added a filter "woocommerce_single_product_image_thumbnail_html" to change the image size of the product, but it does not work, and the filter "post_thumbnail_size" works, but that's not what I need. Here is my code:

    add_filter( 'woocommerce_single_product_image_thumbnail_html', 'motomir68_image_prod_large', 1 );//not work
    add_filter( 'post_thumbnail_size', 'motomir68_image_prod_large', 1 );//work
    function motomir68_image_prod_large(){
    	return 'large';

    How can I get the filter "woocommerce_single_product_image_thumbnail_html"?


  2. Roy Ho
    Posted 2 years ago #

    You're not using the correct filter. The one you tried to use is for outputting HTML which includes the anchor tag and everything. What you want is this filter:

  3. prolab
    Posted 2 years ago #

    Thank you! My mistake.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic