craigspaeth/nap

How are you linking to images in css?

rschooley opened this issue · 2 comments

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?

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

Yes, I am using cdnUrl to create S3 links.

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