Home › Forums › WoodMart support forum › Equal height images
Equal height images
- This topic has 7 replies, 2 voices, and was last updated 1 year, 9 months ago by Elise Noromit.
-
AuthorPosts
-
March 8, 2023 at 7:07 pm #449462
RichardTRCParticipantIn a multivendor scenario we have no real control of the dimensions the user uploads, and auto cropping will produce unwanted results for them. We would rather fit the image inside the container instead of fitting the container to the picture.
So what would be the best way to ensure all images remain equal height in the shop page and single product page etc without cropping?
Thanks.
March 9, 2023 at 5:43 am #449538
Elise NoromitMemberHello,
Please make the full backup of your site and check the issue on the Storefront theme to detect if our theme causes the problem. Storefront is a free theme developed by WooСommerce.
Best Regards
March 9, 2023 at 1:12 pm #449629
RichardTRCParticipantHi elise,
You have asked this question to everyone who has asked about equal height images so I assume you know the answer to this.
I’ve sorted it out myself. I will leave it here in case anyone searches for the solution;
.product-grid-item :is(.product-image-link,.hover-img) img { width: 100%; border-radius: var(--wd-brd-radius); height: 250px !important; object-fit: contain !important; object-position: center !important; }
March 10, 2023 at 5:17 am #449898
Elise NoromitMemberHello,
This is not the correct solution. That is why we never give it. We are glad you have solved the issue.
Table and image elements are not changed this way in CSS.
If you have any questions please feel free to contact us.
Best Regards
March 10, 2023 at 5:26 am #449902
RichardTRCParticipantWhat solution do you propose as the correct one? I ask because in every other example of this question being asked the answer seems to always be that it cannot be done.
March 11, 2023 at 5:18 am #450197
Elise NoromitMemberHello,
Please check this manual: https://xtemos.com/docs-topic/image-size-and-content-alignment-in-a-product-grid/
You need to upload images of the same size for the grid, if you want to use an image any place, you configure the width and height by means of the builder.
If you have any questions please feel free to contact us.
Best Regards
March 11, 2023 at 6:31 am #450203
RichardTRCParticipantHi Elise, thanks but sorry but that isn’t what I want to achieve and isn’t suitable for my use case. (As mentioned in my first post). Hence why I used CSS to ensure the image container stays at a consistent size and shows the whole image without cropping it. I thought you meant there was a better way to achieve what I needed.
March 11, 2023 at 11:47 pm #450339
Elise NoromitMemberHello,
Yes, I see. I just need to inform you about the disadvantages of using CSS.
If you have any questions please feel free to contact us.
Best Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register