My current approach to loading an image is using this code:
<div id="bglion"><%= image_tag("BG-LION6.png")%></div>
, which successfully displays the image. However, I am interested in loading the image from a CSS file instead.
After researching some options, I attempted the following:
#bglion {src: background:url('BG-LION6.png');}
#bglion {src: asset-url('BG-LION6.png');}
#bglion {src: asset-url('BG-LION6.png', image);}
Despite my efforts, the image still does not appear on the page. How can I adjust my code to make it function properly?
(The image file is located in /assets/images)