Hello,
I’ve added the css code in your custom.css:
.category-block img {
width: 215px !important;
height: 143px !important;
}
Please check the category page now.
Best regards,
Jack Richardson.
Solved8 replies2 participantsUpdated by Jack Richardson
Hey together,
I would like to crop the category-images just like the product-images are on the shop-site. How could I do that, since your theme does not support it natively?
Best Regards,
Lars Schellhas
Hello,
I’ve added the css code in your custom.css:
.category-block img {
width: 215px !important;
height: 143px !important;
}
Please check the category page now.
Best regards,
Jack Richardson.
Hello,
well, to be honest, this is not what i wanted.
The pictures should not be stretched, but cropped. – Like the pictures of products are on the shop-page.
Is there any possibility to do this?
Best Regards
Further more you have deleted my complete custom.css-file… -.-
Hello,
The pictures should not be stretched, but cropped.
Then try the following css code:
.category-block img {
object-fit: cover;
width: 150px;
height: 150px;
}
Further more you have deleted my complete custom.css-file… -.-
Your custom.css file was empty when I opened it. Please note we don’t delete anything without client confirmation.
Best regards,
Jack Richardson.
Hey,
the code works (except in MS Edge & IE, but seems like they are working on it). Thanks for that. 😉
Unfortunately (for me probably) I would like to show the category a little bit bigger than the image is, because WP loads a 143×215-thumbnail (e.g. http://www.leihes.de/wp-content/uploads/2016/02/5304-Menuegabel-Hepp-Ecco-143×215.jpg). It would be much better if it simply would load the 300×300 or 350×370 thumbnail. Do you have an idea, how to work this out?
If not, thank you anyway – you helped me a lot (didn´t knew the object-fit/object-position properties yet).
Best Regards,
Lars
P.S.: I restored the custom.css from today´s backups. Everything´s finde. 🙂
Hello,
Sorry for a long delay.
Please try to remove the code in the file wp-content/themes/idstore/code/woo.php:
remove_action( 'woocommerce_before_subcategory_title', 'woocommerce_subcategory_thumbnail', 10 );
add_action( 'woocommerce_before_subcategory_title', etheme_woocommerce_subcategory_thumbnail', 10 );
in lines 503, 504. After that regenerate thumbnails and check your images.
Best regards,
Jack Richardson.
Hello,
I´m willing to wait for an answer that helps. And yours does.
In combination with the css-properties from above it´s just perfect.
Thank you very much – well done.
Best Regards,
Lars Schellhas
Hello,
You are welcome!
Best regards,
Jack Richardson.
The issue related to '‘Force cropping of category-images’' has been successfully resolved, and the topic is now closed for further responses
Free AI store scan · SalesMax
Paste your store address. SalesMax AI shows which upsell moments are missing. No signup.
Free AI speed test · FlashMax
Paste your site address. FlashMax runs Google Lighthouse for phone and desktop, checks Core Web Vitals and lists what to fix. No signup.
Minimal Fashion StoreFashion
(live demo, opens in a new tab)
Home Decor 02 StoreFurniture
(live demo, opens in a new tab)
TravelBusiness
(live demo, opens in a new tab)
Purely HandmadeElementor
(live demo, opens in a new tab)
PosterPortfolio
(live demo, opens in a new tab)
Transportation and LogisticsCars & bikes
(live demo, opens in a new tab)
Handmade StoreBeauty
(live demo, opens in a new tab)
Coffee StoreFood & drinks
(live demo, opens in a new tab)
Hipster StoreFashion
(live demo, opens in a new tab)
Books StoreBooks & art
(live demo, opens in a new tab)
Zoo ShopSports & travel
(live demo, opens in a new tab)
PerfumeBeauty
(live demo, opens in a new tab)
Minimal StoreFashion
(live demo, opens in a new tab)
Organic Cosmetics StoreBeauty
(live demo, opens in a new tab)
Drinks StoreFood & drinks
(live demo, opens in a new tab)
Agricultural StoreWPBakery
(live demo, opens in a new tab)