Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find images #10

Closed
RobbieTheWagner opened this issue Mar 24, 2015 · 6 comments
Closed

Cannot find images #10

RobbieTheWagner opened this issue Mar 24, 2015 · 6 comments

Comments

@RobbieTheWagner
Copy link

New issue, that I assume is similar to not being able to find the assets, I now have an issue where it cannot find my images.

http://rwwagner90.github.io/ember-drop/

The image is in the repo, in the gh-pages branch, in an images folder.

What do I need to do to get it to find it?

@DanielOchoa
Copy link
Contributor

Are you still having this issue? I'm not entirely sure but I think the images should be under the assets dir as well.

@RobbieTheWagner
Copy link
Author

Yes, still have the issue. Please look at the page link I posted above. Open the console and you'll see the failed request for the image.

@DanielOchoa
Copy link
Contributor

The baseURL property that gets set on the index.html only applies to relative url's on the document itself, this means that it will not be set for assets loaded through, say, css.

By inspecting the image relative to other assets I noticed that it is not prefixed by ember-drop like the other assets. For example, the browser is looking for the image under /images when it should be looking for it under /ember-drop/images.

The only thing I can think of now to fix this issue is to change the stylesheet to load the image from /ember-drop/images/cream_pixels.png. This, of course, will break when running the dummy app locally, but you could technically make a gh-pages dist with this path and it should work.

This should solve your problem, although having ember-cli-gh-pages do this for you would be the ideal thing. I'll open an issue on the subject.

@benoror
Copy link

benoror commented Feb 9, 2016

I believe that loading img's on runtime will not reference the asset correctly, I'm having a similar issue: #45

Let me know if you solved it 😄

@knownasilya
Copy link
Contributor

Like I mentioned in #45, this addon creates a production build, which fingerprints resources automatically. If you have dynamic resources in your templates, they will not be fingerprinted, so you need to ignore the fingerprinting for those resources in your ember-cli-build.js file.

@benoror
Copy link

benoror commented Feb 9, 2016

@knownasilya Thanks, here's my solution: #45 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants