On the site, users can upload their images in any quantities (their photo albums). I keep files locally so far /files/u1/sdF/aXnKDpt2eg.jpg.
I figured out the storage space, but I don’t know how to store all this in the database. At first I thought of making a table of files with id, path fields and linking by id, but I suspect that this table will quickly swell up to several million and will work more slowly.
So wondering how best to store links to images in the database?