lara30453's avatar

S3 vs local server storage with image uploading

OK, so I am creating an application where users can upload a personal avatar instead of using Gravatar. I am unsure on how to manage the filesystem - where to store these images.

I was going to create a users folder on them successfully signing up to the site, the folder will be named after their username which is unique. I would then store the users images in their folder and also in their DB row. The users folder would be in the root of my app.

Should I use a service like s3 to handle this or use my personnel server to store these images? Can i use a separate server to store and pull images from ?

Also, is there any good tutorials for image uploading and using Laravel's file system extension ?

0 likes
3 replies
IsaacBen's avatar
Level 7

S3 is good if you expect huge amount of images because it will save you money on the long term. In your case it's only avatars so I would stick with the local storage, assuming you use a VPS like Digital Ocean or something. Plus, if you let them sign in through Facebook you can take their profile images and save space

1 like
lara30453's avatar

@itzikbenh Thanks. So what if I was going to add functionality where they could add more images to a gallery, what should I use ? S3? Also I will be requiring avatars and a cover photo/background image. And is there any good tutorials on how to implement local or s3 storage in laravel, or is it simple ?

IsaacBen's avatar

It really depends. I personally would start in a local storage. Otherwise you might pay more for nothing. You can always add that later. About tutorials just check on google, I never had to do it myself.

Please or to participate in this conversation.