imageproxy icon indicating copy to clipboard operation
imageproxy copied to clipboard

support for rasterizing svg

Open u0nel opened this issue 3 years ago • 3 comments

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

u0nel avatar Feb 01 '22 14:02 u0nel

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

davidp94 avatar Mar 15 '22 07:03 davidp94

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?

willnorris avatar Mar 15 '22 14:03 willnorris

Hi @willnorris,

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

cmahlert avatar Apr 11 '22 17:04 cmahlert