Background image style works fine on local as there is no digest
on locale, but on production, after assets:precompile
, all assets add fingerprints and there is no non-digested asset names in Rails 4. Due to this,
background-image: url('abc.png')
does not work.
Is there any way to let background images work after assets:precompile
?
In CSS use
https://guides.rubyonrails.org/asset_pipeline.html#css-and-erb
and in Sass
https://guides.rubyonrails.org/asset_pipeline.html#css-and-sass