Skip to main content

I have a component setup that looks like this. (Example attached below)


The placeholder image is set to ‘fill’ width / ‘640’ fixed height. I’m using this component in many places in my design file. Not all images I add to the placeholder fill the height in the design file. (Example attached below)


Can the height of this placeholder be adjusted depending on the size of the image placed? Otherwise, I’ll have unnecessary white space at the top and bottom of the image if it doesn’t fill the full placeholder space.


Hi there,


Thanks for the post. I thought it might be achievable by using auto layout with the Fill option, but it doesn’t seem that straightforward.


Let’s wait for the community to respond and see if anyone has any tips.


Thanks,

Toku


One way is to use a component for the images but that’s a bit too complicated:



Or if you don’t mind some cropping on the images, make sure the setting is set to Fill:


If you want to keep Aspect Ratio, it’s not possible unfortunately at the moment. One of the alternatives is to use a plugin like this for now

https://www.figma.com/community/file/873125264217713781


I hope it helps!


Thanks,

Toku


Reply