How to store multiple Images in database?

Web Servers: How do photo sites store images efficiently with the right balance between good quality and storage size required? In what format and with what other practices (compression, database vs file system)?

  • Scenario to consider: if there's a need to produce manipulated (e.g. resize or filters) versions of the images in the future?

  • Answer:

    Photo storage websites generally allow you to upload compressed JPG files and do not alter the file.  So they don't need to worry about the balance between quality and size, as that was determined when the file was created. There are exceptions.  Facebook is more of a social networking site rather than a photo storage site -- I don't know anyone who uses it to maintain their online photo collection.  It downsizes and re-compresses large images. If you were to build a website which allowed online photo editing (likehttp://pixlr.com/) then you might consider saving only the edit operations rather than the edited images at each stage, because image compression is generally a lossy process. As for databases, it's not a good idea to save image data in databases directly.  Read these good answers:

Ed Chang at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.