- This topic has 7 replies, 2 voices, and was last updated 4 years, 4 months ago by Tom.
-
AuthorPosts
-
May 31, 2019 at 9:21 am #916451John MacKenzie
hi all, ok so having an issue with product image sizing. seems there are 2 settings for this
Customize > layout > woocommerce > single product – product image area width.
why cant this be set as a pixel amount? it seems if i have it set to 40% some images that are too small get stretched REALLY big, while others do not?
there there is a setting in customize > woocommerce > product images, set as a pixel width but this doesnt seem to do anything.
see the product linked below and compare to the product #8bl
is the problem the fact that the first image is too small to start with?
also if you can tell me how to add a bit of padding on the right as the zoom plugin i added seems to cause this to get really close to the text.
thanks!!
May 31, 2019 at 3:36 pm #916682TomLead DeveloperLead DeveloperThe option in Customize > Layout > WooCommerce is just the image area itself – not the actual image. However, WooCommerce forces the images to be 100% of this width.
To prevent that, try this CSS:
.woocommerce div.product div.images img { width: auto; }
For the spacing, try this CSS:
.woocommerce #content div.product div.summary { padding-left: 2em; }
April 17, 2020 at 9:10 pm #1243732John MacKenziethanks for following up on this and i didnt reply. Im still struggling with the fact that images on product pages are really tall. Why cant woocommerce have a max height dimension of the image and resize it down to that max setting?
eg this one is way too tall /product/drawing-2/we cant size images ourselves since its going to be a marketplace and not a lot of control of what the vendors upload.
thanks!
April 18, 2020 at 9:42 am #1244484TomLead DeveloperLead DeveloperHave you tried their image sizing options in the Customizer?
If you have an example for me to check out, I can see if CSS will help.
April 18, 2020 at 10:20 am #1244531John MacKenzieHI Tom
the customizer doesnt seem to have height, only width and that doesnt really seem to work with not cropping the image?
thanks!
JohnApril 18, 2020 at 5:23 pm #1244803TomLead DeveloperLead DeveloperHave you tried the WooCommerce plugin options in the Customizer (not the GP ones)? I think they have image width and height options.
April 21, 2020 at 8:18 pm #1248691John MacKenzieyes i dont see any height options there?
i mean why cant the images just resized scale to a specified dimension in stead of all this cropping or ratio business, thats the only thing that makes sense?
April 22, 2020 at 9:12 am #1249480TomLead DeveloperLead DeveloperYea, not sure why they went that route. Image sizing in WordPress is very difficult, so they likely have their reasons.
If you want to link me to a page with an image that needs resizing, I can likely provide some CSS which may do the trick.
-
AuthorPosts
- You must be logged in to reply to this topic.