Upload image and get image

Hi,

I usually use the image widget with binary fields to upload images and works very well. Is a way to be prossible that these widget can be customized? For example, one option to resize the image or crop it to specific width and height? I would be great that can optimize the image size too.

One last question, I’m not sure how to get the URL of an uploaded image?

Thanks in advance!

Long ago I read this topic

So I think that is not possible by default , but you can use pillow to process the image once user has uploaded. I’m not an expert (disclaimer)but my approach would be like: Use on_change methods to write my pillow code there to overwride the image before record gets saved.

1 Like

There is a proposal Add in/out transformation for Binary

1 Like