user1611830
user1611830

Reputation: 4865

referencing image url in asset vendor directory

How can I reference background image url when the css file is in vendor/assets/stylesheets directory ? After looking to SO posts

background: url(myimage.png) repeat-x;

and

background: asset-url('myimage.png'image) repeat-x;

but none of them worked

Upvotes: 0

Views: 564

Answers (3)

Gildas.Tambo
Gildas.Tambo

Reputation: 22663

try this File Path

 background-image: url("../../assets/ion/myimage.png") repeat-x;

Upvotes: 0

Ajay
Ajay

Reputation: 4251

Place your image inside app/vendor/assets/images/myimage.png

#research_sign {
background: url("myimage.png") repeat-x;
}

    #Important: don't forget to restart your server!
     (as you added image inside your vendor/images)

Upvotes: 0

epsilones
epsilones

Reputation: 11627

You should try

background: url("/assets/ion/myimage.png") repeat-x;

Upvotes: 1

Related Questions