Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ensp's avatar
Level 1

Cannot access images on shared hosting

Hi Everyone.

I'm a newbie on Laravel framework/community.

I've deployed Laravel on shared hosting. I have following structure.

  • root:
    • laravel-app
      • public
        • images => here are the images saved(root/laravel/public/images
    • public_html => from here the images are accessible.

How I can make a connection for the images to be accessible from the laravel/public/images on the link example.com/images/smile.png?

Can somebody help and explain in detail, this would be very very helpful for me.

0 likes
5 replies
jlrdw's avatar

If in public I generally:

<img src="{{ asset('upload/imgdogs') . '/' . $row->dogpic }}" alt="" class="image">

Public is not part of the url however, you point to public as document root.

The asset helper has always worked for me.

ensp's avatar
Level 1

@jlrdw I'm using LARAVEL as REST-API for mobile app.

How I can achieve this connection between laravel/public/images with public_html/images? Any ideas?

ensp's avatar
Level 1

@jlrdw I meant how to link laravelapp/public with shared hosting public_html directory. For the API it self it's all good.

But I want to link laravelapp/public folder which is in the root, with the public_html

jlrdw's avatar

@ensp if the laravel symlink isn't working, use the ln linux command. You can just look up some examples of usage.

Please or to participate in this conversation.