craigspaeth / nap

Compile, manage, & package stylesheets, javascripts, and javascript templates for node.js
MIT License
122 stars 33 forks source link

How are you linking to images in css? #73

Open rschooley opened 10 years ago

rschooley commented 10 years ago

This CSS works in dev but will break in S3 because it resolves to the S3 subdomain for Amazon without the bucket name:

CSS: background: url('/images/logo.png')

Modifying that to a relative path will work in prod, but breaks dev due to now the assets dir is nested: (public/assets/public/foo)

CSS: background: url('../images/logo.png')

I don't see a background-image in the sample css, how are you pathing to images with nap?

craigspaeth commented 10 years ago

Have you tried using the cdnUrl option? This is how I point to assets on S3.

rschooley commented 10 years ago

Yes, I am using cdnUrl to create S3 links.

The issue is the pathing to the images bucket in S3 when using cdnUrl.