Hi I’m trying to create a scaling card with an image. I’m using stacks. But no matter which combination I do I can’t get the image (which is a ratio of 3:2) to scale proportionally. I want to keep the ratio 3:2.
The quick answer to that is to use the Scale tool (just select your Frame and hit the K key), but that won’t put Stacks to work in that sense. Could you please let us know what action you would like to take on that card?
Is the goal to maintain this aspect ratio after manually changing the size of the Frame, like dragging its handlers or entering the values in the Inspector? Or is it something else?
Please let us know so we can understand the goal better
Is the goal to maintain this aspect ratio after manually changing the size of the Frame, like dragging its handlers or entering the values in the Inspector? Or is it something else?
Yes - dragging the handlers or entering values.
We can’t use the Scale tool as that will change/scales text etc.
Essentially, we should be able to keep the proportions of the image as we scale the frame. I thought having it locked and using relative would do this but I’m assuming this is a bug?
Thanks for the reply and the clarification. Indeed, what you want to achieve here is different than just simply scaling. @JorgeF and I were discussing this earlier today, but this specific case adds a bit of complexity.
You want the image to resize, while keeping its aspect ratio when:
You manually resize the card
When you change the width or height of the element where it is in
When you change the content of the card (and the card reacting to it).
Depending on your setup this might be possible (to an extent). Could you share a sample document with us so we can take a look?
I don’t think it needs to be complex. The lock icon next to width and height fields locks/constrains those together when switched on, so in theory it should be the same when we scale the element, surely?
It seems this is ignored when scaling a stack. If the stack scales it should scale any element with the lock icon switched on, in proportion (so width and height scale together). This is why I thought it was a bug.
The image element only has a choice of fill or fixed. Neither adhere to the lock.
Thank you for the document. It’s a great example of the kind of flexible card layouts you can build with Stacks.
To be transparent, what you’re seeing isn’t a bug, but it is a known limitation of our resizing features. While Stacks are great for managing spacing and distribution, they don’t currently support “aspect ratio locking” for images when a parent container is resized.
As you’ve noticed, when the card grows, the image tends to stretch or fill the available space based on its sizing settings (Fixed or Fill) rather than maintaining that specific 3:2 ratio.
We know how important proportional scaling is for components like yours, and our team is actively considering this feedback for future updates.
In the meantime, you can grab the Source Symbol of that card and mark both resizing options of that image instance as “Fill”. The result won’t be 100% 3:2, but it will resize respecting that similar aspect ratio. See video: