How do I make the image sizes a custom aspect ratio?

Hi! I would like to make give the product images on my product grid a 5:4 aspect ratio without adapting the size of the images themselves (they are uploaded square). I would also like to change the ratio on the default product page so that it is also 5:4 rather than a square. Is this possible? Thank you!

Hi @hollypie002 , thanks for reaching out.

To address the issue, please help me follow the below-detailed steps:

  1. Navigate to Theme → Edit code. https://prnt.sc/btBdiFPCpXOT

  2. Open the setting_schema.json file => Click on the content => Press Ctrl + F (or Command + F on Mac) and search for the keyword Product card. https://prnt.sc/0Huw0XhvNQ0b

  3. Insert the following code a little below the “options” line: https://prnt.sc/fNYhVoiVodDg

{
            "value": "1.25",
            "label": "5:4 aspect ratio"
          },

Further explanation:

1. Value: 1.25 represents the aspect ratio of 5:4, where 5 is the width and 4 is the height. You can adjust the value to another ratio as needed, as long as it is enclosed in quotation marks ".

2. Label: The text entered here will appear in the settings menu, and please feel free to customize it to your preference.

This is the result in the theme’s settings and preview:

I hope my solution is helpful to you.

Liz

Hi Liz,

Thank you for your response. I have just looked and there is no line with ‘Product Card’ in it under setting_schema.json.

Am I missing something? Thanks!

Hi @hollypie002 , thanks for your feedback.

May I ask about the Theme you’re using to assist you further?

I look forward to hearing from you.

Liz