You need to sign in to do that
Don't have an account?
Sarisfdc
Limit Size of image on Visualforce page
I am displaying image on the VF page.
I want to set maximum size of image VF on page.
Lets suppose if image size is 640x480 then it should become 360x240 on VF page- I achived this by putting mx-width style.
But I want if image size is less than 360x240 then it shows its original size, it should not stretch and show into 360x240 size.
I want to set maximum size of image VF on page.
Lets suppose if image size is 640x480 then it should become 360x240 on VF page- I achived this by putting mx-width style.
But I want if image size is less than 360x240 then it shows its original size, it should not stretch and show into 360x240 size.
I just tested and the image is not streched out. I created a new vf page here is the code:
the first image is greater than 300x300 (It was perfectly scaled) and the second image is less than that (It did not streched out in any way).
You can also give them a styleClass and specify those attributes by CSS class I think they should work the same
There can be two options with your question