Background image not loading in meteor

I have a background image under the public folder but I am not able to see the background image. Below is the code.

Pls help.

… codes missing :neutral_face:

1 Like

Code below – dont know why the html template code is not visible when i submit. But its a simple code with a template named “home” and below the template declaration, a body tag with style background-image: url(’/public/bg.jpg’)

Templates go in body tags not the other way around. That could be one issue.

the template tag has just the name and the body tag is outside of the template tag. It works if the change the background image to a background color.

Yea dont use public in the path. Just do background: url('/bg.jpg'); and try that.

1 Like

this worked. Thanks :smile:



How can i add a linear gradient to the image:

background: linear-gradient(to right bottom, rgba(37, 39, 77, 0.747), rgba(37, 39, 77, 0.781), url('/img/bus.jpeg'));

That is not working.