Click here to Skip to main content
15,908,626 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have around 25 images on my page their original size is 400*400

i have assign original path to images and wrote a style as

CSS
.resize{

height:129px;
width:129px ;

}


but what happening is image getting resize very slowly
is there any mekanisme i can make it faster
I think because i assign the path of original image
the resizing of image takes time and image render from top to bottom at very slow rate

Please Suggest
Many Thanks..
Posted
Updated 13-Apr-12 22:19pm
v3

1 solution

The resizing itself might not take so long, but the downloading of the images. Typically the downloading of a 400x400 image will take longer than its resizing on even a moderate speed processor.

You basically have two ways to solve that:

(a) Store your images in multiple resolutions on your server (or your hosting service) and download the copy that is already fitting in size.

(b) Do the resizing on your server (or your hosting service) on the fly. So only relatively small images get transmitted.

In either case, be aware that photographs loose a little bit of sharpness when simply resizing them. So you might want to do some sharpening afterwards too.
 
Share this answer
 
Comments
Rakesh S S 14-Apr-12 2:41am    
i have 1000s of images on server so point (a) i dont think practical
i have already website running with (b) solution and it takes less time in comparison but i want performance to improve further
Thats why i tried the above solution
nv3 14-Apr-12 3:46am    
It is not a question of how many images you have. You can downscale them by a simple script and have the sharpening done in that script also. The downscaled images take only a small fraction of the size of the originals, so it's not a matter of space either. It you put the downscaled images in a separate sub-directory you can even keep the original file names. Just apply the sub-directory name in your HTML code. That approach worked fine on my website and I have thousands of images as well.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900