Archived topic
Shop Image Size
18 replies · Started by Forum User on February 7, 2023
All the "shop" images on this site https://www.tryhypnosisnow.com/hypnosis-downloads/view-all-our-downloads/ are the same size. How do I create a standard "shop" image size on this website https://lifechanginghypnosisdownloads.org/shop/
Appearance > Customize > WooCommerce > Product Images > “Thumbnail width” field does NOT work
Hello there,
Try adding this through Appearance > Customize > Additional CSS:
.woocommerce-shop.woocommerce.woocommerce-page .wc-product-image .inside-wc-product-image img {
width: 100%;
object-fit: cover;
}
@media (max-width: 768px) {
.woocommerce-shop.woocommerce.woocommerce-page .wc-product-image .inside-wc-product-image img {
height: 300px;
}
}
@media (min-width: 769px) and (max-width: 1024px) {
.woocommerce-shop.woocommerce.woocommerce-page .wc-product-image .inside-wc-product-image img {
height: 400px;
}
}
@media (min-width: 1025px) {
.woocommerce-shop.woocommerce.woocommerce-page .wc-product-image .inside-wc-product-image img {
height: 200px;
}
}
This should make all images uniform on different views.
You can alter the heights set in the code if you want.
That worked. Thank you.
Can you provide Similar CSS for
related products picture sizes
upsell products picture sizes
cross sell products picture sizes
category image sizes
Product image size
Can you provide sample links to where I can see these images?
Product Category https://www.tryhypnosisnow.com/hypnosis-downloads/product-category/fears-phobias/
Product Page - Image at the top- https://www.tryhypnosisnow.com/hypnosis-downloads/product/overcome-a-fear-of-being-alone/
Product Page - Scroll towards the bottom below content - You may also like… https://www.tryhypnosisnow.com/hypnosis-downloads/product/overcome-a-fear-of-being-alone/
Product Page - All the way on the bottom - below "You may also like…" images https://www.tryhypnosisnow.com/hypnosis-downloads/product/overcome-a-fear-of-being-alone/
Let's address this last "Product Page – Image at the top".
Let's address the other stuff first.
Replace the code I provided with this:
.archive.woocommerce.woocommerce-page .wc-product-image .inside-wc-product-image img {
width: 100%;
object-fit: cover;
}
@media (max-width: 768px) {
.archive.woocommerce.woocommerce-page .wc-product-image .inside-wc-product-image img {
height: 300px;
}
}
@media (min-width: 769px) and (max-width: 1024px) {
.archive.woocommerce.woocommerce-page .wc-product-image .inside-wc-product-image img {
height: 400px;
}
}
@media (min-width: 1025px) {
.archive.woocommerce.woocommerce-page .wc-product-image .inside-wc-product-image img {
height: 200px;
}
}
.single-product.woocommerce .entry-content section:is(.related, .upsells) img{
width: 100%;
object-fit: cover;
}
@media (max-width: 768px) {
.single-product.woocommerce .entry-content section:is(.related, .upsells) img {
height: 650px;
}
}
@media (min-width: 769px) and (max-width: 1024px) {
.single-product.woocommerce .entry-content section:is(.related, .upsells) img {
height: 400px;
}
}
@media (min-width: 1025px) {
.single-product.woocommerce .entry-content section:is(.related, .upsells) img {
height: 400px;
}
}
That did not work
Hi there,
this:
Appearance > Customize > WooCommerce > Product Images > “Thumbnail width”
Which is a woo option should auto generate the new thumbnail sizes.
But this will only crop an image if the original image is large enough to do so.
Can you confirm that is the case ?
I believe this is what you want to confirm.
Does that option not work as well?
Can you try removing the CSS first and see if that setting works?
That option was active,and not working, before I added the CSS.
Can you try #1 here to test if anything is causing it not to work?: https://docs.generatepress.com/article/debugging-tips/
I tried and the issue has not been resolved.
Is that original product image bigger then the size you have set in the Thumbnail Width ?