willnorris / imageproxy

A caching, resizing image proxy written in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support for svg

u0nel opened this issue · comments

commented

As svgs images aren't bitmaps imageproxy could either convert svgs to bitmaps and output the result. I found this snippet which does that.

The other option would be to do all transformations as svg, which I think is possible with github.com/ajstarks/svgo

commented

@willnorris any ETA for this feature? happy to provide sponsorship

I don't have any plan to implement this myself, so can't really give an ETA. Someone that is sufficiently interested would need to do the work.

However, I'm honestly not sure I'd accept the patch upstream, since it looks like it would require additional dependencies and I don't entirely understand the utility of this. SVGs are already infinitely resizable (and almost always smaller file size), and if displayed on the web, then CSS transforms should be able to do most everything imageproxy can do. So what's the use case of rasterizing an SVG? I guess for display in applications or contexts that don't natively support SVG?

Hi @willnorris,

"contexts that don't natively support SVG" -> that's it in my case. I would like to transform SVGs to PNGs.