Assuming there is an image file in
Rails will happily find and generate the correct tag for
image_tag('logo') in development mode.
However, in production mode (on Heroku, default asset pipeline / webpacker settings),
image_tag('logo') will fail with an
asset not present in asset pipeline error.
Correct approach is to use
image_tag('logo.png') instead. Using
image_tag('logo') should break or emit a warning in development.
Googling it reveals I’m not the only person falling afoul of this one: