asset() behaving strangely

Posted 1 year ago by mdecooman

On my machine the view renders the image with either of these

//the image is in /storage/app/public/

<img class="card-img-top" src="{{ asset('storage/'. $image) }}">


<img class="card-img-top" src="{{ asset($image) }}">

But when deployed only the first one works (as I would expect). So, my question is why on my local machine, the image is rendered?

config: Laravel 5.5 and my configuration file is basic, I only changed the APP_URL in the environment file accordingly. The php artisan storage:link was run and the symlinks are working as expected too.

Not a show stopper but when something 'magic' happens on your local machine you get curious...

Anyone ran into the same weird behaviour?


Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.