I am creating a website where I am generating ten thumbnails per video (the user picks one, but can change later between the ten thumbnails). At this moment I am saving the time in seconds in the filename of the thumbnail like this: "1-3.jpg", "2-14.jpg", etc. I then explode (split) the string, remove the .jpg (substr) and at that moment I got the time when the thumbnail was taken (this has to be shown to the user).
Should I stick with this method or create a database table with thumbnails and save the time, url and to which video it belongs? Which one is more effecient? The thumbnails are only generated once.
Thanks for helping me out!
Edit: When I have 1 million video's in my database, I have 10 million thumbnails stored in my db. Should I delete the thumbnails which aren't picked from the database when the video is published to save storage space and database operations?