BuddyBoss Home – Web › Support Forums › Solutions › Social MarketPlace › Adjust product image sizes on shop and individual product pages
- This topic has 9 replies, 3 contibutors, and was last updated 8 years, 8 months ago by Anonymous.
Question
March 19, 2016 at 10:56 am #64074@kruttenI use a narrower product image than is used in theme templates – on all pages that have product images. I have changed the image size in the Woocommerce display settings and regenerated thumbnails, but I can’t figure out how to adjust the css so that the full image shows on the appropriate pages. The only place that the full image shows is in the lightbox. As far as I can tell, the image size I set in the Woocommerce settings is the resulting size of the box that shows on the shop home page, including text. I need the image itself to be that size and the box made bigger (same width but taller) to accommodate that. Help?
Answers
March 21, 2016 at 5:17 am #64227@
AnonymousHi @krutten
For width following css has been used, you can put the width accordingly.
At rest of location 100% width is used.woocommerce #content div.product div.images, .woocommerce div.product div.images, .woocommerce-page #content div.product div.images, .woocommerce-page div.product div.images { width: 456px; }
Regards
Varun DubeyMarch 21, 2016 at 6:46 am #64250@kruttenThanks @Varun … I tried your CSS but it had no effect that I could see. I’m not sure I explained my problem clearly – I use product images that are a horizontal rectangle instead of square (2:3 ratio; ie. 200px wide by 300px tall, etc.). I need the full product photos to be visible on all pages (shop, individual product page, etc.) Currently, the top and bottom of my product images is cut off.
March 22, 2016 at 10:59 am #64631@kruttenStill need help with this…
March 22, 2016 at 11:26 am #64637@
Anonymous@krutten Try this code:
add_action(‘init’, ‘remove_plugin_image_sizes’);
function remove_plugin_image_sizes() {
remove_image_size(‘bm-shop_single’);
add_image_size( ‘bm-shop_single’, 200, 300, true );}
My suggestion is to use 400×600 images will look better.
March 22, 2016 at 11:26 am #64638@
Anonymous@krutten Use it in child theme functions.php
March 22, 2016 at 12:03 pm #64645@kruttenThanks @Zarko … I tried your code but it had no effect. I’ve attached a screenshot of what the product image looks like in my shop. As you’ll notice the top and bottom of the photo are cut off. The same is true on the individual product page.
March 22, 2016 at 1:21 pm #64656@
Anonymous@krutten Ok, I thought you were taking about large image on single product page, try this:
add_action(‘init’, ‘remove_plugin_image_sizes’);
function remove_plugin_image_sizes() {
remove_image_size(‘bm-product-archive’);
add_image_size( ‘bm-product-archive’, 200, 300, true );
}and than regenerate thumbnails.
March 22, 2016 at 1:53 pm #64663@kruttenYes!! That did the trick, at least for the shop page. Thanks @Zarko! Now what do I need to do to make the same adjustment for the individual product pages? The code provided earlier didn’t work for that.
March 25, 2016 at 11:42 am #65193@
AnonymousGreat, I will close this topic
Feel free to create new topic for any further queries.
Regards
Varun Dubey
- The question ‘Adjust product image sizes on shop and individual product pages’ is closed to new replies.