I have an APEX 20.2 application where I can upload image files and display them in cards. Because the cards only display a small version of the image, I want to launch a modal form to display just the image at a decent size. When I do this by just displaying the image column as “Display Image”, I get the image at a larger scale which is heavily cropped to fit inside the page.
Is there an easy way to display the image so it fits without cropping?
You need to apply some CSS. Follow the below steps:
Click on your Display Image item, then in the Advanced > Custom Attributes, paste the following style code:
You can change the max-width and max-height according to your modal dialog size.
It worked for me. Please try and let me know.
I tried your solution and it worked, but since I was working with an image, I found a better style was:
style=”display: block; margin-left: auto; margin-right: auto; width: 95%”
Yes, this is also fine.