akash-akya / vix

Elixir extension for libvips
MIT License
166 stars 20 forks source link

image href svg render #125

Closed Leastrio closed 1 year ago

Leastrio commented 1 year ago

Is there a way to render image tags with url hrefs? Using Vix.Vips.Operation.svgload_buffer! doesnt like them and just doesnt fetch the image and embed it.

akash-akya commented 1 year ago

Hey @Leastrio, are you trying to fetch the image over the network? afaik rsvg, the library libvips uses to render svg, only supports data:// or file:// uri schema. If possible, can you share a sample code which is failing

Leastrio commented 1 year ago

Ah okay that would make sense. I guess a workaround would be to just fetch the image myself and insert it into the svg data.