Height auto for image at components

I often run into the problem that I would like to have the following properties for an image in a component:

width: 100%
height: auto

This would be good if images have different aspect ratios to be able to place them anyway. Currently I can’t make a component out of it, because I can only replace the fill here and then the height always remains the same as defined in the component.

1 Like

This is probably a common scenario, isn’t it? How do you solve the problem?

Hey @Stefan,

It sounds like you’re wanting to use Scale/Scale constraints for your image within your frame, before creating a component out of it.

Thanks for your reply! Not sure if this helps if I wound width: 100% height: auto scenario within my component? So height of image jumps depending on native image height.