context: I want you in my main view some images are displayed. (These are predefined by me). I also want to store imaganes uploaded by users, however, do not know which side to store these images.
You have to distinguish between publicly available images like a banner, background etc and restricted ones.
The former can and should go in public/images.
But for user profile photos, I'd suggest keeping them somewhere safe and not public.
E.g. if you put them in storage/images/profiles/, access them like this:
use Intervention\Image\Facades\Image;
public function getImage($image_path)
{
// Check if the visitor/user is allowed to view the image.
return Image::make(storage_path('/images/profiles/') . $image_path)->response('jpg');
}
I also suggest some sort of hosting or cdn for images.
Google has a very inexpensive cdn hosting option that should only be a couple $$ a month. As mention though a lot of image hosting services are poping up with amazing features and APIs.
If not the storage/public (I think) if you use envoyer. This keeps your images separate from releases.