How can I use compass inline-image helper with an image url that is not relative?
relative_assets = false
I also tried commenting that out completely
hdr-main.png lives in the /test/images/ on my local Server.
.test{
$image:"hdr-main.png";
background: inline-image($image);
}
.test{
$image:"http://i.cdn.turner.com/cnn/.e/img/3.0/global/header/hdr-main.png";
background: inline-image($image);
}
Compass was unable to compile one or more files in the project:
File not found or cannot be read: /Users/myname/test/images/http://i.cdn.turner.com/cnn/.e/img/3.0/global/header/hdr-main.png
I'm not entirely sure what the issue is since you haven't actually asked a question. You have working code and I'm assuming you're trying to render a production stylesheet as well.
You should probably leave $image: "hdr-main.png"
as-is then use config.rb to set your http_images_path
to http://i.cdn.turner.com/cnn/.e/img/3.0/global/header/
.
You'll want to probably use this in conjunction with setting the environment
to production.
if environment == :production
http_images_path = "http://i.cdn.turner.com/cnn/.e/img/3.0/global/header/"
end
then you'd build your CSS with the following
compass compile -e production
Again, this is assumption since there isn't a clear question posted above. If this isn't what you need, please ask a specific question.