tags:

views:

38

answers:

3

What techniques do people commonly use for uploading, storing and presenting images with a CMS?

Do you store them in the database or on the file system?

Do you generate thumbnails on upload? Or on the fly, then maybe cache them for reuse? Or rely on browser scaling?

+3  A: 

Typically, most content management systems will store images the actual data of image uploads to the file systems and then add a link to the file within the database. Thumbnails can either be generated on upload or on first request (on the fly is considered inefficient, especially given the cheap cost of storage). Browser scaling is a bad idea (images may be uploaded as multi megabyte uncompressed files) but is done by some systems.

Kevin Sylvestre
A: 

find a cms which have bulk upload funtion

bonita tona
A: 

i agree with kevin. i can't think of any cms that doesn't store in the file system. then only issue that comes up with that technique is if you are planning on clustering multiple web servers to run your cms. if thats the case then you have to plan on it and have the ability to point all the web servers to the same file storage location.

the technique ive used for years is on upload, resize the image to something practical for the web, then generate the thumbnail, then write them to the file system and record the pointer in the database.

if the site is a huge site then you need serve the images from cache servers because file systems are very slow in comparison to network IO. take facebook for example, they have billions of images on their site and last i heard 80% were held in cache servers around the world in ram. the file storage array they have is more or less a backup to the cache servers.

scphantm