Collection Image Aspect Ratio Syncing Across Pages Using Different Collections

Hello,

I need to set different image ratios for images coming from different collections. I currently have two pages, each connected to a separate collection, and each page requires a different image ratio. However, when I change the image ratio on Page B to “Adapt to image” in the editor, it also updates the image ratio on Page A. I need Page A’s images to remain square while allowing Page B’s images to adapt to their original ratio. Perhaps this can be done with a little bit of code?

Any help on this would be greatly appreciated.

Thank you.

1 Like

This can be done with a bit of code of course but you can do it yourself by creating another template.

So create a new template from the existing collection template. Choose different image styles on both. And then go to your collection from the admin and choose the template to show that collection. This way if you add more collections in future you can just choose templates from the collection.

Best

Shopify themes operate on templates. Take some time to watch some how-to videos. It’s really very easy.

Hey @motolanix1

You just need to create two different collection templates and then assign those templates to their specific collection. Once that’s done then you have to edit the templates so in one of the template you can set it to “Adapt to image” and for the other one, you can set it to Square.

Templates would be a bit confusing at first for beginners but once you understand how they work then they’re the easiest. Let me know if you require any help.

Best,
Moeed

Hi @Shadab_dev, thanks for the response. So that I am clear, could you please list the steps to do this so that I can follow and setup the templates, thanks.

Hi @Moeed , thanks for the response. So that I am clear, could you please list the steps to do this so that I can follow and setup the templates, thanks.

Here, this will help

1 Like

@motolanix1 could you please share the store URL? I’ll be happy to take a look.