Hey @Varun_Damani! Thanks for reaching out. This isn't something that Retool natively supports, but there's definitely a workaround.
Attaching an image to the fileButton
component exposes the following data, none of which immediately tells us its dimensions:
However, it's possible to construct a data URL for this image and read its dimensions that way.
In this particular example, I've also defined a variable called imageValidation
that I reference from within a custom validation rule.
I hope that helps! Let me know if you have any additional questions.