When using less.js, can you not use relative paths for images? Like background:url(../img/header.jpg)
It seems to convert it to an absolute path, that is wrong.
When using less.js, can you not use relative paths for images? Like background:url(../img/header.jpg)
It seems to convert it to an absolute path, that is wrong.
I know this is an older question, however I ran into a similar problem and the accepted answer did not work for me.. this did.
Set an @img-path variable to your desired relative path, then use that variable to force LESS to render using that path instead of an absolute path.
@img-path: "/assets/images";
background-image: url("@{img-path}/your-image.jpg");
Check out this other answer I found that pointed me down the right path: https://stackoverflow.com/a/6296706/1896352