ffsw ffsw - 1 year ago 118
Javascript Question

using <img src in ember cli

I couldn't get a image showing up in ember cli. I tried to use the html img tag and made an exception into my environment file.

contentSecurityPolicy: {
'img-src': "'self' * all"

<img src="/public/images/image.png">

And I'm getting the following error message:
Failed to load resource: the server responded with a status of 404 (Not Found)

What I'm doing wrong?

Answer Source

Do not include the public directory when specifying the path.

Instead, just try the following:

<img src="images/image.png">

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download