How to store images 🧐 Hi what is the best/easiest/most secure way to store user uploaded images for a user profile or a blog post.
Im currently writing a website where users can upload images, but some images could and should be more private than others.
On the one hand, if I have a blog post the images can just be public accessible and then im thinking to store the path in the DB.
However if it's useruploaded for a feed post, the image should not be accessible via a simple URL, or at least I see that as a security concern.
So my question is: what's the best way to store different images for my webpage? I can't find any resources on how to deal with this problem.
the easiest way is to store it in the public folder of your app, but I think the best practice is to store it in the storage folder and create a symlink using php artisan storage:link.
check out Caleb's video https://laravel-livewire.com/screencasts/s5-filesystem-disks on configuring filesystem disk and upload files
@Sabonzy I will have a look at the video tomorrow and then return if I have further questions thank you so much for the help 💪🏼
Please sign in or create an account to participate in this conversation.