-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
SVG files are broken #220
Comments
This is a strange bug, as we discussed on Discord, because what you’re getting in the screenshot is the string representation of a Uint8Array. In other words, you’ve somehow got the bytes of the string of the bytes of the image. |
I can confirm that this happens with other SVG images too, like this one: https://upload.wikimedia.org/wikipedia/commons/e/e8/Svg_example3.svg Here’s a small demonstration:
|
Does my fix help? |
It does, but the approach concerns me. There ought to be some way to get the right content from the request. |
But it working, better working approach, than nothing.
This commit is working, thank you! |
I too have this issue with SVG files across all my projects using the later versions of the plugin. |
Yeah, this essentially makes the svg format of |
Fixed by #221 |
When I try to save the remote image with the Eleventy Image plugin, the SVG file is broken.
I've tried to use Buffer but had no luck.
So I've tried to debug what is going on.
The function
createSvg
in thesrc/format-hooks/svg.js
file returns the following Uint8Array data, which is then stored as an SVG file. I don't know how to fix this.The text was updated successfully, but these errors were encountered: