Resizing Images on-the-fly vs. storing multiple copies on the file system

Resizing Images on-the-fly vs. storing multiple copies on the file system

Post by dadon » Tue, 20 Sep 2005 23:31:00


I am working with a web application that allows users to upload high
quality photos into an image library. Those images will then be used in
different places and at displayed at different sizes. My question is,
does anyone know if generating different sizes of the images on-the-fly
would be a big performance hit as opposed to generating several sizes
of each photo as they are uploaded and storing them on the file system.

For example, in the on-the-fly scenario you would just pass different
attributes to a file and it would take the original image that you have
stored and generate the appropriate size, like this.

getPhoto.aspx?size=small

or

getPhoto.aspx?size=large


Any suggestions or opinions would be greatly appreciated.
 
 
 

Resizing Images on-the-fly vs. storing multiple copies on the file system

Post by James West » Wed, 21 Sep 2005 01:45:09

How about checking to see if the image at the size requested is
available, and if not then converting it and storing it?

James

 
 
 

Resizing Images on-the-fly vs. storing multiple copies on the file system

Post by SharpCoder » Thu, 22 Sep 2005 01:16:14

this may lead to some security issues. it would be *much* easier for a
haker to do the DOS in this case because of the fact that image
resampling with gdi+ is very resource intense.