Square Screen Sized Image

Hello! I am trying to add an image into my app that is square but resizes based on the width of the device (I expect to be testing on different devices and I don’t want to use an absolute value). I tried using blocks to set the image height and width to be the screen width:
image
I tried making a column and successfully got it to be the right size but when I added the photo in it would be too big and sometimes cover the whole screen.
When I set the image resize mode to contain, though, it does work a little bit but I think there is some height issues. It makes the image take up all the space so-to-speak and then positions itself in the center, so there is just a bunch of space above and below it. I think it has something to do with the justifyContent, alignItems, alignSelf stuff… I tried different options and it didn’t really make a difference :frowning:

Please help and thank you!

Ps. I would like the whole screen to be scrollable in the end

hi @mythi, did you learn how to fix your image in the APP? i am having the same issue and found this post from you. Thanks in advance!

Hi @danibarzo16i718! I was not able to fix the problem back then but after working on other projects I have found that you usually have to put a wait block (can be just .05 seconds) before settings those things. Hope this helps!

Ok thanks for your feedback @mythi!

1 Like