I am showing the image which is uploaded by user in a modal dialog. On this image I am initializing JCrop for cropping the image.
The problem is that I am not able to set the image properly in the dialog, it works ok for images whose size (dimensions) is less than dialog size but for images bigger than dialog size, the image is going out of the dialog.
I tried using boxHeight and boxWidth but this make image non responsive and for smaller size screen the image is going out the dialog.
Basically I am looking for generic solution of showing image in a dialog no matter the image size so that it is displayed properly inside the dialog.