Automatically Resize Images in Collection Lists To Fit Properly (Zooming Out & Adding White Space)

Hello,

Is there a way to code so that in collection view images of products are resizes automatically so not to cut anything off? Can it be coded so that when an image is too big so that it has to be trimmed at the edges, the code would automatically zoom the image out to fit and add white space where the image would be lacking from the frame?

I’m using the Dawn Theme.

Many thanks in advance.

Hi @woodpaz_books

You can add this code to your theme.liquid file after , in Online store > Themes > Edit code, and check if it works