Error with SVG Input buffer on zeit/now platform
See original GitHub issueFirst of all, thanks for this great and useful module!
Description
This code essentially converts an svg
String
into Buffer
to pass as input to sharp
and then obtain its png
output, works as expected.
Something like:
const src = `<svg>…</svg>`
const buff = Buffer.from(src)
sharp(buff).toBuffer().then(data => console.log(data))
Expected behaviour
Running it in my local machine works as expected:
Local machine is Max OS X El Capital (10.11.6)
Works well also in another computer Ubuntu 16.04.3.
Problem
I am trying to deploy a microservice that use at some point similar code of this reproduction, and love the simplicity of now, but when deploying it doesn’t work as expected. Returns:
Error: Input buffer contains unsupported image format
Repo
I created a repository with the simplest code I found break the functionality here: https://github.com/elrumordelaluz/sharp-test
The endpoint deployed using now
is https://sharp-test.now.sh/
Please, let me know if you think is a issue related on now
platform or deployment process instead if sharp
.
Thanks in advance and congrats for the great work!
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (9 by maintainers)
The version of libvips on ZEIT Now includes SVG input support now. I believe this issue can be closed.
Thanks, this confirms that zeit/now provides a globally-installed libvips v8.5.8 that has been compiled without SVG support. You’ll need to take this one up with them, good luck!