Aspect ratio inside of flex-layout

Is there a way to put an image in a flex-layout so that it has 100% of the width of its parent and still keeps the aspect ratio?

If not that would be a great feature. Not even figma has such a feature, but it is possible with a component from the community which uses a complicated workaround.

Hello LucaVin,

That’s a really interesting suggestion, I will add it to out project so we can evaluate how viable it is :slight_smile:
You can check it out here: Taiga

Have a good day!

1 Like

It would also be good to be able to change the image of an image-frame without having to replace the entire frame completely, like in figma. For example, i can also use an image as a background for a frame, e.g. in an auto-layout frame. that would also be closer to the web standard.

So the best solution is to put this feature like figma in the fill. So i can choose between solid-color, gradient, image and maybe in the future video.

I think the big advantage of Penpot to Figma should be that Penpot is closer to the web standards. What you have already done excellently with the Flex-Layout feature. The closer you get to the web standards, the easier and better the cooperation between designers and programmers becomes. You’re on the right track, keep up the good work. Thank you very much for your great work.

Have a good day