Jump to content

How do I stop Squarespace cropping some of my product images?

Recommended Posts

Hi everyone, I was wondering if anyone has come up with a solution to stop Squarespace from cropping certain product images on your online store.

I have a website on version 7.0 (Pedro template). The website sells lots of different products including art of different sizes. At the moment all the product images are being cropped to 4:3, which is fine for most products but not for the art .

It is cropping on both the overview page (https://ammolitecanada.ca/shop?category=Art) and each individual product detail page (e.g. https://ammolitecanada.ca/shop/ammolite-affinity). Could anyone suggest some custom CSS that might fix this problem? Thanks! 

Link to comment

@Sophie2020 Here's a code snippet to fix the cropping issues on product details page. Add the code under Website > Utilities > Website Tools > Custom CSS

.ProductItem-gallery-slides-item-image {
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
    object-fit: contain !important;
    object-position: left !important;
}

On overview page, some of the images are vertically large and some are horizontally large. We can display the images without cropping. However, original sizes of the images will completely change the layout of the product columns.

Here's a code snippet you can try. Add the code under Website > Utilities > Website Tools > Custom CSS

@media only screen and (min-width: 768px) {
	.sqs-product-quick-view-button-wrapper {
		position: relative !important;
		height: 45px !important;
		align-items: flex-start !important;
		justify-content: flex-start !important;
	}
	.ProductList-outerImageWrapper {
		margin-top: -45px !important;
	}
}
.ProductList-image {
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: left !important;
}

Let me know how it goes. Thanks! 

If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. 

Sam
Web Developer & Digital Designer

 Did you find my contribution helpful? Buy me a coffee?

Link to comment
  • 2 weeks later...
  • 6 months later...
On 9/4/2023 at 3:32 AM, tuanphan said:

@Sophie2020 Try this code for desktop

/* Shop page images */
.ProductList-item img {
    width: 100% !important;
    height: auto !important;
    left: 0 !important;
    top: 0 !important;
}

 

This didn't work for the image inside the product details when you click on it. I do not understand why this is still any issue by Squarespace. When selling art and photography, you can't simply just cut off part of the image and have no way for the potential buyers to see the whole piece. Ugh!

Link to comment
On 3/21/2024 at 4:51 AM, StephieMae said:

This didn't work for the image inside the product details when you click on it. I do not understand why this is still any issue by Squarespace. When selling art and photography, you can't simply just cut off part of the image and have no way for the potential buyers to see the whole piece. Ugh!

This code for Shop Page. You can share link to a detail product, we can help easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.