weserv / images

Source code of wsrv.nl (formerly images.weserv.nl), to be used on your own server(s).
https://wsrv.nl/
BSD 3-Clause "New" or "Revised" License
1.84k stars 187 forks source link

text on svg is vanished #353

Closed VenomFate-619 closed 1 year ago

VenomFate-619 commented 1 year ago

expected:-

https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xca850e1deb88aef9579ee738493bc2bb1cbdf05978b968c337588b55ecb6528f/image

image

output:-

https://images.weserv.nl/?url=https://metadata.ens.domains/mainnet/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85/0xca850e1deb88aef9579ee738493bc2bb1cbdf05978b968c337588b55ecb6528f/image

image

content-type is wrong of this

image

VenomFate-619 commented 1 year ago

So , how to serve SVGs

kleisauke commented 1 year ago

SVG images are rasterized to pixels since they are not just images, but documents with full access to all HTML and JavaScript functions. It would be a security threat to serve SVG images as-is.

As for this particular image, you could try removing the feDropShadow filter and references, since it's currently unsupported by librsvg - see: https://gitlab.gnome.org/GNOME/librsvg/-/issues/743

kleisauke commented 1 year ago

I hope this information helped. Please feel free to re-open if questions remain.