Hello, I am trying to access images and css files located in the public directory but I keep running into a 404 saying that the files don't exist.
<img src="{{ asset('/img/tampa-4811962.jpg')}}" alt="Tampa" width="500" height="600">
<link href="{{ URL::asset('/public/css/app.css') }}" type="text/css" rel="stylesheet"/>
my file paths for both the images and css are the following:
public/css/app.css
public/img/images
I've tried using different methods of calling the actual files, like replacing asset() and doing css/app.css instead of appending public and nothing has worked. I'm starting to think its an issue with my laravel installation but I don't know what it could be.
Any help is greatly appreciated.
EDIT:
To anyone reading this, heres an update of what I've tried so far after making this post:
-
Converted local css to scss and built a vite instance. my css is now in a build/assets folder but that shouldn't change much considering it still doesn't work.
-
Running npm run dev or storage links
-
Clearing caches