# Aspect ratio inside of flex-layout

**URL:** <https://community.penpot.app/t/aspect-ratio-inside-of-flex-layout/2437>\
**Category:** Ask the community\
**Created:** [February 3, 2023, 1:20pm UTC](https://community.penpot.app/t/aspect-ratio-inside-of-flex-layout/2437 "2023-02-03T13:20:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![LucaVin](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@LucaVin](https://community.penpot.app/u/LucaVin)\
**Post date:** [February 3, 2023, 1:20pm UTC](https://community.penpot.app/t/aspect-ratio-inside-of-flex-layout/2437/1 "2023-02-03T13:20:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ester](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/ester/32/89_2.png) [@Ester](https://community.penpot.app/u/Ester)\
**Post date:** [February 6, 2023, 6:18pm UTC](https://community.penpot.app/t/aspect-ratio-inside-of-flex-layout/2437/2 "2023-02-06T18:18:57Z")

</div>

Hello LucaVin,

That’s a really interesting suggestion, I will add it to out project so we can evaluate how viable it is 🙂  
You can check it out here: [Taiga](https://tree.taiga.io/project/penpot/us/4797?backlog-owner=426680&backlog-q=flex-&no-milestone=1)

Have a good day!

---

<div class="post-metadata">

**Author:** ![LucaVin](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@LucaVin](https://community.penpot.app/u/LucaVin)\
**Post date:** [February 10, 2023, 3:17pm UTC](https://community.penpot.app/t/aspect-ratio-inside-of-flex-layout/2437/3 "2023-02-10T15:17:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![noraferreiros](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/noraferreiros/32/10402_2.png) [@noraferreiros](https://community.penpot.app/u/noraferreiros)\
**Post date:** [May 27, 2026, 8:48am UTC](https://community.penpot.app/t/aspect-ratio-inside-of-flex-layout/2437/4 "2026-05-27T08:48:43Z")

</div>

I’ve come from the future to support this 😁 🔝

---

<div class="post-metadata">

**Author:** ![Stan\_Ezersky](https://dub1.discourse-cdn.com/flex017/user_avatar/community.penpot.app/stan_ezersky/32/9527_2.png) [@Stan\_Ezersky](https://community.penpot.app/u/Stan_Ezersky)\
**Post date:** [August 17, 2026, 7:14am UTC](https://community.penpot.app/t/aspect-ratio-inside-of-flex-layout/2437/5 "2026-08-17T07:14:06Z")

</div>

This is a bug, and it’s relevant!
