Last post Jul 31, 2007 02:13 PM by begemot
Jul 12, 2007 02:43 PM|begemot|LINK
Saving images on the disk vs creating on the fly.
I am working on the image gallery where I need to present images in 2 different sizes. So, can somebody suggest what would be the best way to handle images: saving on the disk with
2 different sizes or saving just the original image and then automatically sizing the image when it’s requested. What king of overhead will automatic way create for the server. What is a best way to do this?
Jul 12, 2007 04:43 PM|bpw|LINK
In my app the smaller images are used as thumbnails and many thumbnails can be shown on one page. To do this on the fly all the original images would have to be loaded, resized and displayed, every time the page is called. I’m not sure what the overhead
would be exactly, but I guess it would be significant.
I now create a thumbnail on the fly when the main image is uploaded and put it into a ‘thumbs’ sub-directory with the same filename. If I know the name of the main image I know exactly where to find the thumbnail!
All my main images are on disk by the way, not in a database.
Jul 31, 2007 02:13 PM|begemot|LINK