Skip to main content
Solved

Responsive square images

  • December 22, 2023
  • 3 replies
  • 879 views

I have created a card that contains a square image, a product title and a price. I’m using a frame to contain them all and auto layout to keep the text in place. I want to know if there is a way to ensure that the square image stays square when responsively resized?

Best answer by Rachael_Raghuram

Hi Kim, Thank you for your reply. Appreciate your help with this, it’s been driving me bonkers! I want the image to dynamically change, but it must remain in its square format. I don’t want the image to become rectangular in anyway – which is what seems to be happening.

For example, I have created a product card for a category page. Dropbox - Unknown-2.png - Simplify your life

When I increase the size of the overall card (holding down shift and dragging the bottom right corner handle) I’ve set the constraints up to resize the objects accordingly, but the image doesn’t not maintain its square ratio. Is there a way to do this?

Many thanks,
Rachael

View original
This topic has been closed for comments

3 replies

ksn
Figmate
  • Community Support
  • 1632 replies
  • December 26, 2023

Hey @Rachael_Raghuram – if I understood your question correctly, you’re have text and an image in a frame. You have the frame set with auto-layout to keep your text where you’ve set it, but you also want the image you have to dynamically change in size if you adjust the size of the frame.

If that’s the case, you’d want constraints on the image so it adjusts in size dynamically. HOWEVER, it’s not possible to apply constraints to layers outside of a frame, or layers in an auto layout frame, so the image will not be able to perform this behavior.

Let me know if I misunderstood. See here for more info on constraints: https://help.figma.com/hc/en-us/articles/360039957734-Apply-constraints-to-define-how-layers-resize#apply


Hi Kim, Thank you for your reply. Appreciate your help with this, it’s been driving me bonkers! I want the image to dynamically change, but it must remain in its square format. I don’t want the image to become rectangular in anyway – which is what seems to be happening.

For example, I have created a product card for a category page. Dropbox - Unknown-2.png - Simplify your life

When I increase the size of the overall card (holding down shift and dragging the bottom right corner handle) I’ve set the constraints up to resize the objects accordingly, but the image doesn’t not maintain its square ratio. Is there a way to do this?

Many thanks,
Rachael


ksn
Figmate
  • Community Support
  • 1632 replies
  • January 12, 2024

hey! Sorry this is such a late response, but I checked in with the support team, and it sounds like you’re looking for a locked aspect ratio. This isn’t currently available in the platform‌, but this plugin may help: https://www.figma.com/community/plugin/1234709595094737890

lemme know if I misunderstood.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings