woocommerce_gallery_image_size

woocommerce_gallery_image_size

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_gallery_image_size') is found 2 times:

  • /includes/wc-product-functions.php line 1008
    1004
    1005
    1006
    1007
    1008
    1009
    1010
    1011
    1012
    1013
    1014
    $props['thumb_src_w'] = $src[1];
    $props['thumb_src_h'] = $src[2];
     
    // Image source.
    $image_size      = apply_filters( 'woocommerce_gallery_image_size', 'woocommerce_single' );
    $src             = wp_get_attachment_image_src( $attachment_id, $image_size );
    $props['src']    = $src[0];
    $props['src_w']  = $src[1];
    $props['src_h']  = $src[2];
    $props['srcset'] = function_exists( 'wp_get_attachment_image_srcset' ) ? wp_get_attachment_image_srcset( $attachment_id, $image_size ) : false;
    $props['sizes']  = function_exists( 'wp_get_attachment_image_sizes' ) ? wp_get_attachment_image_sizes( $attachment_id, $image_size ) : false;
  • /includes/wc-template-functions.php line 1724
    1721
    1722
    1723
    1724
    1725
    1726
    1727
    1728
    1729
    1730
    $flexslider        = (bool) apply_filters( 'woocommerce_single_product_flexslider_enabled', get_theme_support( 'wc-product-gallery-slider' ) );
    $gallery_thumbnail = wc_get_image_size( 'gallery_thumbnail' );
    $thumbnail_size    = apply_filters( 'woocommerce_gallery_thumbnail_size', array( $gallery_thumbnail['width'], $gallery_thumbnail['height'] ) );
    $image_size        = apply_filters( 'woocommerce_gallery_image_size', $flexslider || $main_image ? 'woocommerce_single' : $thumbnail_size );
    $full_size         = apply_filters( 'woocommerce_gallery_full_size', apply_filters( 'woocommerce_product_thumbnails_large_size', 'full' ) );
    $thumbnail_src     = wp_get_attachment_image_src( $attachment_id, $thumbnail_size );
    $thumbnail_srcset  = wp_get_attachment_image_srcset( $attachment_id, $thumbnail_size );
    $thumbnail_sizes   = wp_get_attachment_image_sizes( $attachment_id, $thumbnail_size );
    $full_src          = wp_get_attachment_image_src( $attachment_id, $full_size );
    $alt_text          = trim( wp_strip_all_tags( get_post_meta( $attachment_id, '_wp_attachment_image_alt', true ) ) );