Woocommerce problem image

  1. Into the shop page and into the you may also like i have a problem . The slider of the image it is blocking at least 80-90% of the image of the product so it is difficult to go to the page of the product . Could be possible to open it at 50% of the image dimensions ? Thanks

  2. Why the images into the shop page have different sizes ? How can I use the same size for all the products? thanks

Hey @Borislav.VD,

####1. It’s possible using custom CSS but you must reduce the text size and button like this:

Here’s a sample CSS for that:

.woocommerce li.product:hover .entry-wrap {
    top: calc(100% - 5.785em);
}

.woocommerce li.product .entry-header h3 {
    padding: 0.6em;
    font-size: 13px;
}

.woocommerce li.product .entry-header .price>.amount, .woocommerce li.product .entry-header .price>ins>.amount {
    font-size: 18px;
    color: #fff;
}

.woocommerce li.product .entry-header .button {
    margin: 15px;
    padding: 0.25em .5em 0.075em;
}

####2. X and Pro are still currently using shop_catalog thumbnail size for archive pages and in the front-end, it does not work anymore and it’s displaying the full size image.

I’m not sure why it works in the Customizer though.

To use the WooCommerce Image Size settings, you currently need to add this code in your child theme’s functions.php.

// X WooCommerce Thumbnail Size Fix
function x_woocommerce_shop_product_thumbnails_temp_fix() {

  GLOBAL $product;

  $id     = get_the_ID();
  $thumb  = 'woocommerce_thumbnail';
  $rating = ( function_exists( 'wc_get_rating_html' ) ) ? wc_get_rating_html( $product->get_average_rating() ) : $product->get_rating_html();

  woocommerce_show_product_sale_flash();
  echo '<div class="entry-featured">';
    echo '<a href="' . get_the_permalink() . '">';
      echo get_the_post_thumbnail( $id, $thumb );
      if ( ! empty( $rating ) ) {
        echo '<div class="star-rating-container aggregate">' . $rating . '</div>';
      }
    echo '</a>';
  echo "</div>";

}
add_action('after_setup_theme', 'x_wc_thumbnail_fix');

function x_wc_thumbnail_fix() {
  remove_action( 'woocommerce_before_shop_loop_item_title', 'x_woocommerce_shop_product_thumbnails', 10 );
}

add_action( 'woocommerce_before_shop_loop_item_title', 'x_woocommerce_shop_product_thumbnails_temp_fix', 10 );

I’ll post this in our issue tracker.

Thanks.

ok thank you :slight_smile:

Glad we were able to help :slight_smile:

Hi,
this is the same problem which I have written on peer to peer forum

after adding in to functions.php nothing happens in my shop

only some products without photos now having smaller frame, but one of it have the biggest

I will have in my shop many doors to sell - problem is becouse all of them have photos in stupid ratio

look at this

https://indlu.eu

thanks
Michał

Hi Michał,

I would suggest that you crop the images to the same sizes using an image editor first before uploading it to your site instead of having to rely on the plugin in resizing the images which is not always correct.

Thanks

Hi Paul,
I know that resizing image before uploading is the best answer now.
Problem is when it will be about 2 000 products with similiar image size, but not the same

Hey @mlewy,

The code won’t automatically resolve the issue. You need to choose WC image size in Customize > WooCommerce. If doing so does not resolve the issue, please open a separate thread and give us WP admin and FTP access in a Secure Note.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.