I'm failing to set url
property for background-image
. Things work good with sail npm run build
but with sail npm run dev
path breaks. It is embarrassing, but I would like to ask for some help here:
welcome.blade.php
<head>
@vite(['resources/css/app.css', 'resources/js/app.js'])
</head>
app.css
.test {
background: url('../../storage/images/bg1.jpg');
width: 100%;
height: 200px;
}
Path to css works file: http://0.0.0.0:5173/resources/css/app.css
Path to image inside css file doesn't work because it lead to: http://0.0.0.0:5173/storage/images/bg1.jpg
bg1.jpg
file can be accessed on port 80 but not on port 5173. What is the trick? How it suppose to work?
Addition info:
sail up
andsail npm run dev
on progress- Laravel v10.7.1 (PHP v8.2.5) clean installation, all defaults.