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

Doesn't work in safari #47

Open
nazarposhta opened this issue Jun 17, 2016 · 3 comments
Open

Doesn't work in safari #47

nazarposhta opened this issue Jun 17, 2016 · 3 comments

Comments

@nazarposhta
Copy link

Hello everyone!
I included my SVG element like that:
<img id="thumb-icon" class="inject-me" src="/images/svg/innovate.svg" title="Preview" alt="Preview">
it works good in chrome but only "Preview" message in safari.
Safari's console said me that:
Unable to load SVG file: /images/svg/innovate.svg
How I can manage that problem?
Some idea?

@jeffsilva90
Copy link

jeffsilva90 commented Jun 24, 2016

Just remove the first slash in the src attribute:
src="/images/svg/innovate.svg"
to
src="images/svg/innovate.svg"

And another bug I've discovered in Safari is that if you decide to define a width value in the tag <img>, you have to define the height as well. I think the best way is to leave it blank and control the width with css styles.
Otherwhise it will return a NaN value :(

Hope this could help you :D

@markadrake
Copy link

Sorry but those are 2 different paths up above. One is relative to the domain (or base URL) and the other is to the page you're current on.

@nazarposhta are you still having issues in Safari with this library? Could you please provide a CodePen or JSFiddle link?

Hopefully you have resolved the issue. If this isn't an issue any longer could you please close it? It appears as if the library doesn't work with Safari. Thanks.

@tobireif
Copy link

@nazarposhta is this still an issue?

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

4 participants