unable to retrieve images uploaded on aws instance using laravel

unable to retrieve images uploaded on aws instance using laravel

i am trying to upload image via laravel and then retrieve its url to save in database and return back to the front end application , image upload is working fine at localhost but not at ec2 instance .

i am trying to upload image via laravel and then retrieve its url to save in database and return back to the front end application , image upload is working fine at localhost but not at ec2 instance .

Image is uploaded successfully and can be downloaded via filezilla also

i have setup chmod -R 777 for the storage directory in laravel but its still not working

public static function upload_files($type, $file, $id)

{
    if ($type == 'profile_pic') {
        $image = $file->store('profile_pic','public');
         $image = asset('storage/'.$image);
        if ($image) {
            return $image;
        } else {
            return false;
        }
    }
}

it return http://localhost/trip/public/storage/profile_pic/MaHskQD2VcLSlC11VV3agbBNdh7j7k82liewYBw3.pngat localhost and when i click on the link, image is loaded successfully while on my server it loadshttp://mydomain/storage/app/profile_pic/MaHskQD2VcLSlC11VV3agbBNdh7j7k82liewYBw3.png and throws 404 not found error

result of ls -lrt is "-rwxrwxrwx 1 apache ec2-user 190916 Jan 23 10:06 MaHskQD2VcLSlC11VV3agbBNdh7j7k82liewYBw3.png"

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Laravel Framework Development Services | Laravel Web Development

CMARIX is leading Laravel Web application Development Service Provider with the track record of implementing diverse high-performance Laravel web applications with skilled Laravel developer team for clients across the globe<a href="https://www.cmarix.com/laravel-framework-development-services.html?utm_source=SB" target="_blank">.Continue</a>

Web Design Service in USA

Looking for designers for your business website design? We at Data EximIT offer our best **[web designing services in the USA](https://www.dataeximit.com/services/ "web designing services in the USA")** with the aim of craft your website more...

Web Development Services

As one of the best Web Application Development Company, it provides a fine quality mobile app development service at an affordable price. Especially, it encourage start-ups that have unique ideas, by offering a more competitive price