I have spent the better part of the day trying to get images to load on my heroku app. Everything I try works locally, but not after being deployed to heroku.
I h
The images won't be served as assets by default, only css and js. You should look into the answer of
Syed Ehtsham Abbas in this question Heroku does NOT compile files under assets pipelines in Rails 4
You need to do two things to resolve it.
First, change these two lines from false to true in production.rb
file.
config.assets.compile = true
config.assets.digest = true
Second, if you've syntax like this for your images
background: url("imgo.jpg")
Change it to
background: image-url("image.jpg")
I hope it does your job.
Another issue, I was having with this was that I was precompiling my assets locally, prior to loading it to heroku. This requires you to follow a different set of steps, which can be found below. If you precompile your assets locally, you must follow these steps or any updates you made to your assets folder will not be reflected in prod.
https://devcenter.heroku.com/articles/rails-asset-pipeline
RAILS_ENV=production bundle exec rake assets:precompile
commit
and push
to server.