+1 for me! Same problem!
Jan 26, 2017
7
Level 2
Path's in stylesheets to images folder
Hello,
i worked alwase with GruntJs. Now i switching to 5.4 and Laravel Mix. Here are my files.
webpack.mix.js:
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');
mix.copy('resources/assets/images/', 'public/images/', false); // Don't flatten!
My app.scss is:
span.loader
{
background: url(../images/loader.gif) no-repeat center center;
}
Now i ran npm run dev... and the result is:
span.loader {
background: url(./loader.gif?6407495c57fb47ec9615edf51ae5c738) no-repeat center center;
}
but i copied all images to the public/images/ folder. The url must be image/loader.gif6407495c57fb47ec9615edf51ae5c738
How can i change the path to the images folder? The path to the loader.gif is always ./
Greetings
Level 4
I was able to resolve this issue by adding another / like so
background: url(/../images/image.png);
Hope this helps!
10 likes
Please or to participate in this conversation.