cooriestudio Posted August 11, 2023 Share Posted August 11, 2023 Hello, We were interested in seeking guidance in how to change the aspect ratio of our images on mobile to square, they seem to be locked into 3:2 on mobile, but our desktop version seems to dynamically or auto select aspect ratios for our images. We would like to retain our desktop version to auto display images, whilst unlocking our mobile images to dynamic or fix as square - 1:1 images. Website is :https://coorie.studio/ Thanks for your help! Link to comment
Solution Lesum Posted August 11, 2023 Solution Share Posted August 11, 2023 Hi, 1:1 aspect ratio will crop images on mobile view. Here's a code snippet to display product images dynamically. img.ProductItem-gallery-slides-item-image { object-fit: contain !important; } Let me know if that works. Thanks! tuanphan 1 If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
cooriestudio Posted August 27, 2023 Author Share Posted August 27, 2023 Magic! Thank you Lesum. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment