Thumbnail image size/quality | WordPress.org

[ad_1]

Hello,
Here is the hook for changing image size. You can pass width and height based on your needs.

// for thumbnail image size
function woocommerce_gallery_thumbnail_size_callback( $args ) {
  return array(240,240,0);
}
add_filter( 'woocommerce_gallery_thumbnail_size', 'woocommerce_gallery_thumbnail_size_callback', 99 );
// for main image  size
add_filter( 'woocommerce_get_image_size_single', 'woocommerce_get_image_size_single_callback',99);
function woocommerce_get_image_size_single_callback( $size ) {
  return array('width' => 800, 'height' => 600, 'crop' => 1, );
}

Thank You.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer