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

Local File Paths for src not working #13

Closed
iChip opened this issue Nov 9, 2021 · 1 comment
Closed

Local File Paths for src not working #13

iChip opened this issue Nov 9, 2021 · 1 comment

Comments

@iChip
Copy link

iChip commented Nov 9, 2021

According to the README.md, this is a valid src: const src = '/path/to/file.svg'

This won't work for me, so I read through the source and looks like the library supports a url since a fetch request is made, not local file paths as per above.

Please clarify the docs as to intended usage or add support for local file paths.

@robinscholz
Copy link
Owner

Updated the docs, thanks. Your best bet would probably be to convert your files to a base64 string via FileReader.

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

2 participants