Add image to layout in ruby on rails
image, layout, ruby, ruby-on-rails
Solution
Anything in the `public` folder is accessible at the root path (`/`) so change your img tag to read:
<img src="/images/rss.jpg" alt="rss feed" />
If you wanted to use a rails tag, use this:
<%= image_tag("rss.jpg", :alt => "rss feed") %>
Problem
I would like to add an image in my template for my ruby on rails project where i currenly have the code `<img src="../../../public/images/rss.jpg" alt="rss feed" />` in a the layout `stores.html.erb` file however this doesn't seem to load as it looks like its missing a route which i'm not sure what its supposed to be. Any ideas please?