Let's say I want to store images using a file system, not database. Each item will have its own directory named after its id value where multiple images associated with that item can be stored. There will be an images table with 'id' , 'item_id', 'extension', and regular laravel timestamps fields. Each uploaded image will be stored in images table, and its filename will be renamed to its newly inserted 'id' value. End users will not be able to rename images, just delete and upload new ones.
I haven't tried implementing it yet, but will it work and can it become a problem later on to display and delete those images if i'm not storing their full filenames in the database and if i'm just making file names equal to their database id values? Or is it better to store full filenames in a separate column?
I would save the filename in the database too. I think that's also helpful for SEO. And also the MIME type. You get it mostly from the file extension but I've seen to many people simply rename their files from .jpg to .png and think they converted it...