0

I have followed a doc that proposed creating a public directory to hold images, fonts and js files. It reads the fonts, but does not display images but when I manually navigate to the images on the browser it displays, what could be wrong? directory structure:

app_root->public->assets->img->1.jpg

on the browser: http://localhost:3000/assets/img/portfolio/1.jpg which displays the image. What wrong am I to right?

ken4ward
  • 2,246
  • 5
  • 49
  • 89

1 Answers1

0

Don't use absolut links, use relative! Meteor build css, scss, js, image files. File structure:

/
/public
/public/img/
/public/img/1.jpg

And try this:

<img src="/img/1.jpg" alt="First image">

If you want to reach it from outside, you have to set it in the router.

Previous answer: How to serve static content (images, fonts etc.) using iron router

Server static example: https://gist.github.com/goje87/8aa5c04bf3b0f5de907d

Community
  • 1
  • 1