Closed vincentcordel closed 10 years ago
@musixite I assume you are using latest version of asset pipeline?
You can put your images in the /app/assets/stylesheets/
directory or you can put the images in /app/assets/images/
.
If you have /app/assets/images/foobar.png
then you can find that image at http://[hostname]/assets/foobar.png.
If you have /app/assets/stylesheets/foobar.png
and /app/assets/stylesheets/foobar.css` and inside of that css file do
.mystyle {
background: url(foobar.png);
}
Perfect, thanks!
My mistake was to put the images dir on the root of the assets. It seems like it's impossible to go down a level.
But it's all good now ;)
When I have my css files in the assets directory outside of the public directory, I tried to get back to the public path (../../public) for an image I want to use in a background css declaration.
However, it's not working. The path still starts with assets.
Which path do I need to use so I can keep my files outside of the public directory?
Thanks!