Picture Uploader (Making image fit to size)

Hi everyone,

I am wondering if anybody has managed to make their picture uploader so the image you upload fits the size of the board you create? I uploaded a random image to test it and I guess the image was too big because its zoomed in. Is there a way to make it so it automatically fits to the square you draw out if this makes sense?

Screen Shot 2020-07-27 at 1.41.10 PM

Hi! Did you manage to solve the problem? I am having the same issue.

You could use the picture uploader element as data source for an image element:

https://manual.bubble.io/core-resources/elements/visual-elements#image-source

You could also place the picture uploader element over the image element, then after this input is changed, you insert the value in a custom state that will be the source for the image element. At the end, you reset the picture uploader element, this way you don’t have the images duplicated.

https://manual.bubble.io/help-guides/structuring-an-application/custom-states#defining-a-custom-state
https://manual.bubble.io/core-resources/events/element-events#an-inputs-value-is-changed
https://manual.bubble.io/core-resources/actions/element#reset-relevant-inputs

I hope this helps!

1 Like

Thank you very much! I thought maybe there is a way to do it without workarounds, cuz I thought there had to be fit/rescale function. Anyway, thank you for the solution!