What's the best approach to store multiple images in database?
Upon browsing and searching for solution and approaches I found 2 options
first one is take the file name and concatenate and separate them using either comma or |
but I'm having doubts since I think that's messy and would produce errors later in the system
second is I make another table for images and add foreign key (post_id) to know which post it belongs.
Any suggestion will be appreciated.
imagescolumn, you can have{1: 'image1.png', 2: 'image2.png'}