Eu quero definir o caminho para a imagem de fundo em menos arquivo app\design\frontend\vendor\theme\web\<lessfile>
no magento2.
Eu quero definir o caminho para a imagem de fundo em menos arquivo app\design\frontend\vendor\theme\web\<lessfile>
no magento2.
Respostas:
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 in app\design\frontend\vendor\theme\web\images
folder. if still not working remove var/view_preprocessed
folder.
@baseDir
in your themes' theme.less
. By default the variable is set to ../
.
background: url("@{baseUrl}images/icn.png');