woocommerce_resize_images

woocommerce_resize_images

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

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

apply_filters('woocommerce_resize_images') is found 1 times:

  • /includes/class-wc-regenerate-images.php line 202
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    * @param bool         $icon If icon or not.
     * @return array
     */
    public static function maybe_resize_image( $image, $attachment_id, $size, $icon ) {
        if ( ! apply_filters( 'woocommerce_resize_images', true ) ) {
            return $image;
        }
     
        // List of sizes we want to resize. Ignore others.
        if ( ! $image || ! in_array( $size, apply_filters( 'woocommerce_image_sizes_to_resize', array( 'woocommerce_thumbnail', 'woocommerce_gallery_thumbnail', 'woocommerce_single' ) ), true ) ) {
            return $image;