Eu quero definir o caminho para a imagem de fundo em menos arquivo app\design\frontend\vendor\theme\web\<lessfile>
no magento2.
8
First add image in app\design\frontend\vendor\theme\web\images
folder and write css as below:
background: url('@{baseDir}images/icon_sprite.png');
after add new image run command as below:
- php bin/magento cache:clean
- php bin/magento setup:static-content:deploy
php bin/magento setup:static-content:deploy
command after add image inapp\design\frontend\vendor\theme\web\images
folder. if still not working removevar/view_preprocessed
folder.@baseDir
in your themes'theme.less
. By default the variable is set to../
.background: url("@{baseUrl}images/icn.png');