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

Adobe Illustrator SVG preamble >200 bytes #658

Closed
adriaanmeuris opened this issue Dec 20, 2016 · 4 comments
Closed

Adobe Illustrator SVG preamble >200 bytes #658

adriaanmeuris opened this issue Dec 20, 2016 · 4 comments

Comments

@adriaanmeuris
Copy link
Contributor

I'm receiving this error when loading an SVG file generated by the Adobe Illustrator SVG export plug-in:

Input file is missing or of an unsupported image format

When removing the file's doctype and simply keeping <svg>...</svg>, it works fine.

I was wondering what's causing this, and if you have any recommendations for optimizing SVG files before loading them (e.g. using svgo).

Attached both the original and edited SVG files: svgs.zip
Sharp version: 0.17.0.

thanks

@lovell
Copy link
Owner

lovell commented Dec 20, 2016

Hello, this is probably due to https://github.com/jcupitt/libvips/pull/543, which will be available in a forthcoming 8.5.0 release of libvips.

Until then, removing the leading <!-- Generator:... --> comment is probably your best best to bring the <svg> element back within the 200 byte limit.

@adriaanmeuris
Copy link
Contributor Author

Perfect, thanks for the clarification - looking forward.

@lovell lovell closed this as completed Dec 20, 2016
@lovell lovell changed the title SVG support Adobe Illustrator SVG preamble >200 bytes Dec 20, 2016
@elrumordelaluz
Copy link
Contributor

Seems that stills failing using sharp@0.20.5 here

@lovell
Copy link
Owner

lovell commented Aug 14, 2018

Please see #1252

Repository owner locked and limited conversation to collaborators Aug 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants