+ Start a Discussion
Rahul SharmaRahul Sharma 

Image re-sizing using JavaScript or CSS

Hello techies,

I would like to know the best way to resize (Scale down) the image.

I tried with CSS and javascript function but i'm unable to find the best approach.

Since currently that methods are not much reliable as image gets distorted for most of them.

Any suggestions?

Baktash H.Baktash H.

Why not html?


<apex:image width="10px" url="{!$Resource.myImage}" />

Rahul SharmaRahul Sharma

Thanks developert74,

but, Actually i am displaying the images in a table which are nothing but search result.

Every image is not having same resolution (Height and width).

If i use <apex:image width="10px" url="{!$Resource.myImage}" />,

Every image will be having fixed width thus loosing the actual resolution, or simply its distorted.

So i would like to have a method with which Image is scaled down in a proportion.



Try jquery to resize the image...