A user migrated to a new Shopify theme and their previous CSS code for enlarging collection and product page images stopped working. The old code targeted .res-image with a 6/9 aspect ratio.
Solutions provided:
For collection images on the main page: Add CSS targeting img.w-full.h-full.object-cover with aspect-ratio: 6 / 12 !important; to the theme.css file
Alternative approach: Use img.object-cover as the selector with the same aspect ratio property
Implementation: Edit code through Online Store → Edit Code → theme.css, adding the snippet at the bottom
One responder successfully tested the collection page fix and provided a screenshot confirmation. Product page images couldn’t be tested due to the store having no products listed. An alternative suggestion was made to use a code injection app instead of direct theme editing.
Summarized with AI on October 29.
AI used: claude-sonnet-4-5-20250929.
I was using an old theme before where I was using CSS code to make my collection pictures bigger and my product page pictures bigger. But this code is not working on my new theme. Does anyone know how can I find the right code to use for my theme? I attached the screen shot of the old CCS code that was working.
This is what was working for me before in the CSS field on my older theme. Now on the new theme, i tried so many variations. I cant seem to find one that works.