Is there a way to load base url for background-image in css file? for example:
background-image: url('{base_url}/myimage.jpg');
background-repeat: repeat;
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this community
skin/frontend/theme/theme/css/
- and your images than would be inskin/frontend/theme/theme/images/
. Per that structure you then would specify your background path asbackground-image: url('../images/myimage.jpg')
. I mean to say, you're better off checking why you actually have a need for the base url (i.e. why is your image located in the webroot) and fix that. – Christoph Farnleitner Feb 27 '18 at 5:49