Store pictures as files or in the database like MSSQL for a web app?

Store the pictures on the file system and picture locations in the database.

Why? Because…

  1. You will be able to serve the pictures as static files.
  2. No database access or application code will be required to fetch the pictures.
  3. The images could be served from a different server to improve performance.
  4. It will reduce database bottleneck.
  5. The database ultimately stores its data on the file system.
  6. Images can be easily cached when stored on the file system.

Leave a Comment