What are the best image manipulation techniques?

What methods do people usually use to upload, store and present images using CMS?

Do you save them in the database or in the file system?

Do you create thumbnails at boot time? Or on the fly, then perhaps cache them for reuse? Or rely on browser scaling?

+4
source share
2 answers

Typically, most content management systems will save images of the actual image upload data to file systems, and then add a link to the file in the database. Thumbnails can be generated at boot or on the first request ("on the fly" is considered inefficient, especially considering the cheap cost of storage). Scaling the browser is a bad idea (images can be downloaded as uncompressed files with several megabytes), but they are executed by some systems.

+4
source

I agree with Kevin. I can not think of any cms that are not stored in the file system. then the only problem that arises with this method is that you plan to cluster multiple web servers to run your cms. if so, then you need to plan it and be able to point all web servers to the same file storage location.

used for many years, the isive method downloads, resizes the image to something practical for the Internet, then generates a thumbnail, then writes them to the file system and writes a pointer to the database.

if the site is a huge site, then you need to serve images from cache servers, because file systems are very slow compared to network IO. for example, on Facebook, they have billions of images on their site, and finally I heard that 80% were stored in cache servers around the world in ram. the file storage array that they have is more or less backed up to cache servers.

+1
source

All Articles