Saving images: files or blobs?

I usually go with storing them as files, and store the path in the database. To me, it’s a much easier and more natural approach than pushing them into the database as blobs.

One argument for storing them in the database: much easier to do full backups, but that depends on your needs. If you need to be able to easily take full snapshots of your database (including the images), then storing them as blobs in the database is probably the way to go. Otherwise you have to pair your database backup with a file backup, and somehow try to associate the two, so that if you have to do a restore, you know which pair to restore.

Leave a Comment