Search code examples
imageember.jsassetspublic

Images from public/assets folder in Ember returning 404


I am trying to create my first ember app, and I started fleshing out the landing page. I tried to create a billboard section at the top and placed an image in it with an inline style

background-image: url('/assets/images/photo.png')

I read that you are supposed to put all your images in an assets folder in the public directory which I did, but I am getting a 404 response for that image.

http://localhost:4200/assets/images/photo.png

Solution

  • Remove assets from URL.

    background-image: url('/images/photo.png')

    http://localhost:4200/images/photo.png