In Laravel 5, in what directory should I store images (for backgrounds) and how to access it inside a CSS file. My CSS file is on public/css
directory. I've tried to place the image in public/images
and public/assets/images
but didn't work and even I couldn't access the image directly from web browser.
Just put your Images in Public Directory (public/... folder or direct images). Public directory is by default rendered by laravel application.
In CSS you can access images, when they are in public/images, like
../images/imgename.jpg
In the blade template, you can use something like
"{{ asset('images/imagename.jpg') }}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With