images icon indicating copy to clipboard operation
images copied to clipboard

SVG animation support

Open Heziode opened this issue 3 years ago • 5 comments

It seems that SVG that contains animation doesn't work.

Example: https://images.weserv.nl/?url=https://upload.wikimedia.org/wikipedia/commons/8/87/SVG_animation_using_CSS.svg

However, SVG without animation works.

Heziode avatar Sep 29 '20 00:09 Heziode

It seems doesn't manage gradient too: https://images.weserv.nl/?url=https://upload.wikimedia.org/wikipedia/commons/3/31/Rainbow-gradient-fully-saturated.svg

Heziode avatar Sep 29 '20 02:09 Heziode

@andrieslouw or @kleisauke any information about this issue ?

Heziode avatar Oct 05 '20 11:10 Heziode

librsvg (the library we use to load SVG images) doesn't support CSS-based animations.

The second SVG image you posted does not contain a width and/or height attribute, nor does it define a viewBox attribute, so it will default to 1x1 pixel. You could explicitly set the &w= and/or &h= parameter to load these kind of images. For example: https://images.weserv.nl/?url=https://upload.wikimedia.org/wikipedia/commons/3/31/Rainbow-gradient-fully-saturated.svg&w=250

kleisauke avatar Oct 05 '20 12:10 kleisauke

Thank you for the quick answer.

So… for animation this can take years/decades/Inifinity to be supported :joy: because it seems that it is not planned by librsvg.

Heziode avatar Oct 05 '20 12:10 Heziode

This is being tracked upstream within issue https://gitlab.gnome.org/GNOME/librsvg/-/issues/307.

kleisauke avatar Jan 10 '21 14:01 kleisauke