Serve Images from Asset Host When Using CSS background-image property in Rails

Posted by Moe on Stack Overflow See other posts from Stack Overflow or by Moe
Published on 2010-04-21T02:34:41Z Indexed on 2010/04/21 2:43 UTC
Read the original article Hit count: 532

Filed under:
|
|

I recently started serving static assets (mainly images) from an asset host for my Rails project.

A small portion of my images are not being served from the asset host because they are displayed using the CSS background-image property rather than image_tag

Is there are clean workaround for this? I'd rather not create a "stylesheets" controller because I'm using the asset-packager plugin and would like to preserve this functionality.

Thanks! Moe

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about cdn