woocommerce_resize_images

woocommerce_resize_images

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

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

apply_filters('woocommerce_resize_images') is found 1 times:

  • /includes/class-wc-regenerate-images.php line 202
    	 * @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;