This is probably a matter of personal preference.
Generally, it is best to keep the database small. However, when you come to corporate applications, they regularly add images directly to the database. If you put them in the file system, db and your file system may go out of sync.
Larger CMS will regularly place these files in db. However, keep in mind that this requires a larger database when everything grows ...
When you save only the URL and name, make sure that they do not change in the future.
With files stored in a database, you can make security easier and you donβt have to worry about duplicate file names.
source share