Hi, you can do this by using css in image upload activity.
Refer https://forum.mendix.com/link/questions/107625 for more detail.
Hope it helps you.