Reputation: 195
I am currently making a Meteor website with multiple pages and using IronRouter to have my /client/main.html
display a page frame and import several HTML templates located in /imports/ui
. I have an HTML <img>
element located inside one of the templates-- /imports/ui/home.html
.
Where do I need to put the image file and what do I need to put as the href=
to find the image properly?
I have already tried both using a /public
directory, and putting the image in the /imports/ui
file and then trying to link to it with both the image name itself (as if the template were calling the image from its own folder) and using /../imports/ui/image.jpg
as if main.html
(the page with the frame and Ironrouter links) were calling the image file.
Upvotes: 0
Views: 150
Reputation: 21374
image.png
) in /public
.<img src="/image.png"/>
in your html (note: img
tags use src
not href
attributes -- an easy mistake to make).More details here.
Upvotes: 1