This topic has 9 replies, 4 voices, and was last updated 6 months, 1 weeks ago ago by Andrew Mitchell
Hi, I have a question about images. I have many images in my shop that are supplied by suppliers. They are generally of excellent quality but unfortunately not always the same size. This makes the height of the photo a problem in particular. If a product photo is wider than its height, my products will not all appear on the category page at the same time. The shopping cart buttons are then not aligned, for example. I have already tested with the image settings, but unfortunately I can’t get it to work properly.
The product page also shows a photo that is wider than it is high; display problems. Thumbnails of other photos are therefore not fully displayed. (See the photos I added for both examples).
My question is, is there perhaps a piece of CSS code available that can ensure that when photos are low and wide they are centered by default in a 600 h x 400 w image size? Or are there other ways to get this right?
Hello, Arnan,
Thank you for reaching out to us with your query.
Please provide URLs of pages from your screenshots.
Best Regards,
8Theme’s Team
Hi Rose,
Please see the Private content area.
Kind regards, Arnan
Hello, Arnan,
Please provide URLs of pages from your screenshots.
Best Regards,
8Theme’s Team
Hi Rose, see the private content area for the links. As you may know, the website is not yet live and you can log in using the previously shared login details.
Dear @Arnan,
We hope this message finds you well. To achieve uniform proportions for all product images on your shop page, we recommend implementing the following custom CSS as a one of possible solutions:
.content-product .product-content-image img {
aspect-ratio: 4/3;
object-fit: contain;
}
You can view the expected outcome here: https://prnt.sc/8NI6V-e8Ndkb.
For a similar adjustment on single product pages, please add the following CSS:
.woocommerce-product-gallery__image img {
aspect-ratio: 1/1;
object-fit: cover;
}
Feel free to experiment with different aspect ratio proportions to find the most suitable ones for your needs.
Best regards,
Jack Richardson
The 8Theme Team
Hi Jack, this seems to work nice. I will test it in several settings later today. Thanks for this solution.
Hello, Arnan,
You’re welcome!
Best Regards,
8Theme’s Team
Dear Arnan,
In the spirit of gratitude, we want to express our appreciation for your trust in our products. As a valued customer, your experience matters greatly. Would you consider sharing it by giving our theme a deserving 5-star rating on ThemeForest?
Click here to share your thoughts: https://themeforest.net/downloads
Being part of our community means a lot, and your feedback contributes immensely.
Best Regards,
The 8Theme Team
The issue related to '‘Set minimal sizes for pictures on category and product page’' has been successfully resolved, and the topic is now closed for further responses