Jump to content

Orientation of product images

Recommended Posts

  • 4 weeks later...

@SRLB

Code seems to work for me when I test with your site locally.

Where did you install the code? Is it installed now? If not, please install it then let us know it is, so we can take a look. Assuming of course it is not causing an issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Thx for the quick reply, 

Actually I removed all the code I wrote before to see if it is working.

On the 1st page of the boutique, the photos are in the good format (landscape or portrait) but when one product is selected, the photos on each page are only in possibility (1:1, 3:2, 2:3, ...) for all the product. I can't choose a different format for each photo.

 

Thx for your help 

Link to comment
  • 10 months later...

Hi @creedon

The Code

<style>

  .ProductItem-gallery-slides-item-image {
  
    object-fit : contain !important;
    
    }
    
  </style>

 

Is not working for my store - product images still remain in the orientation of the template. Wondering if there's a work around you could help me with,

 

Eric

Link to comment
4 hours ago, Eric401 said:

Is not working for my store - product images still remain in the orientation of the template. Wondering if there's a work around you could help me with,

Please post the URL for a page on your site where we can see your issue.

If your site is not public please set up a site-wide password, if you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the documentation at the link provided to understand how it works.

Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

We can then take a look at your issue.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
2 hours ago, creedon said:

Please post the URL for a page on your site where we can see your issue.

If your site is not public please set up a site-wide password, if you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the documentation at the link provided to understand how it works.

Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

We can then take a look at your issue.

https://www.ericdushphotography.com/prints You can see that the vertical images are displaying as horizontal. 

Link to comment
On 1/31/2021 at 12:37 AM, creedon said:

@RachaelBaxter

Add the following to Store Settings > Advanced > Page Header Code Injection.

<style>

  .products.collection-content-wrapper .grid-item .grid-item-image {
  
    object-fit : contain !important;
    
    }
    
  </style>

This is just a start.

One thing you can see after adding this CSS is that the 3:2 images are all not the same height. And the same thing for the 2:3 with the width. It would look more consistent if all the images in the two groups were the same size.

Let us know how it goes.

Worked a treat on one of my photography sales galleries, thank you.

To extend this, is there a way to apply this to each individual item page within that gallery?  I don't see anywhere to put custom CSS within the gallery item.

Eddie — The Outdoor Dog Photographer (davedrewphotography.co.uk)

Link to comment
6 hours ago, davedrew said:

To extend this, is there a way to apply this to each individual item page within that gallery?

I'm not sure I understand where you want to apply the effect. The code currently targets the product grid pages of a Store page.

If you link me directly to a page where you want to apply the effect I may be able to help.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
2 minutes ago, creedon said:

I'm not sure I understand where you want to apply the effect. The code currently targets the product grid pages of a Store page.

If you link me directly to a page where you want to apply the effect I may be able to help.

Hi thanks for the reply, problem sorted.  I followed the thread through and saw that you had put some revised code further down:

 

<style>

  .ProductItem-gallery-slides-item-image {
  
    object-fit : contain !important;
    object-position : 50% 0 !important;
    
    }
    
  </style>

 

Link to comment
On 8/19/2022 at 6:58 AM, Eric401 said:

Is not working for my store

It's not working because the code was designed for v7.1 as stated in my March 28, 2021. Your site is v7.0 using the Brine template family.

Quote

You can see that the vertical images are displaying as horizontal.

Please point me to a specific image that is vertical so I don't have to search through all of them to figure out which are tall and which are wide.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment
  • 10 months later...
1 hour ago, ONL said:

I have the same issue with my site on Squarespace 7.0.

Please post the URL for a page on your site where we can see your issue.

A link to the backend of the your site won’t work for us, i.e. a url that contains /config/.

Please set up a site-wide password, if your site is not public and you've not already done so.

Post the password here.

Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site.

Please read the site-wide password and how to share a link documentation to understand how they work.

We can then take a look at your issue.

You may find How to post a forum question post useful.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

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.