function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.

 

raseshtcsraseshtcs

Try jquery to resize the image...