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"

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>

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.Continue

Web Development Services

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

HireFullStackDeveloperIndia is rated as one of the top Web Application Development Company in India by various industry magazines and review sites. They have a right blend of award-winning designers, expert programmers and Google certified digital marketers which make them a unique one-stop solution for hundreds of our clients, spread across all countries.

A Good website reflects not only your business but also it is one of the main factors why a potential customer would convert into Client. A good website design helps increase traffic driving leads to grow business. The best web design company create a custom design for each corporate website so as to help them meet their business goals.

Get Quote: https://hirefullstackdeveloperindia.com/get-a-quote/