Warning sign This requires updating because: librsvg got updated In doing so, you could add a timestamp to the .
Please notify the uploader with {{subst:update-note|1=Librsvg bugs|2=librsvg got updated}} ~~~~

Wikimedia Commons currently uses librsvg 2.44.x[1] for rendering images. It's a fast renderer compared to Inkscape or batik, but it can be buggy at times. There is a discussion about updating to a newer version on phab:T265549 or on re-evaluating the svg-renderer on phab:T40010.

Some files may be fixed now. If there are any files that were uploaded earlier and have an error in displaying, you can try Purging the file to force a re-render. You should check all the resolutions, since the bugs can show up differently in different resolutions.

If you see a buggy image, tag it with {{Rsvg bug}}. This puts it in Category:Pictures showing a librsvg bug. Some more bugs are reported at Commons:Commons SVG Checker#Checks.

librsvg-history on Wikimedia
version live on Wikimedia
number date[2] begin end
2.3.93[3] 2006[4]
2.14.0[4] 2006[4] at least 2007[5]
2.40.16[6] 2016-06 2016[6] 2017[7]
2.40.18[7] 2017-07 2017[7] 2019[8]
2.40.20-3[9] 2017-12 2019[8] 2020[10]
2.40.21[11] 2020-02 2020[10] 2023-05-16[1]
2.42.0 2018-01
2.44.10[1] 2018-12 2023-05-16[1]
2.46.0 2019-09
2.48.0 2020-03
2.50.0 2020-09
2.52.0 2021-09

Rendering of text edit

CSS inheritance edit

Filters edit

Hairline cracks edit

phab:T20936: This bug appears also in modern browsers on zooming levels.

 
White gap visible at odd px sizes (299px)
 
Same pic 1px larger rendered (300px)

An workaround can be the using of merge path.

Pattern edit

phab:T20463: The libRSVG's handling of SVG pattern is only rudimentary. Some fixed examples (bug in file history):

Marker edit

The presentation of markers is in different viewers implemented differently. The origin point varies. Inkscape shows the boundaries incorrectly.

Code of 3) use the translate attribute.

<circle id="circle3" transform="translate(20, 20)" stroke="rgb(0%, 70%, 0%)" cx="0" cy="0" r="20"/>
<marker id="marker3" refX="20" refY="20" viewBox="0 0 40 40"
    markerUnits="userSpaceOnUse" markerWidth="40" markerHeight="40">
  <use xlink:href="#circle3"/>  
</marker> 
<line x1="130" x2="270" y1="180" y2="180" marker-start="url(#marker3)" marker-end="url(#marker3)"/>
</svg>

Note that orient="auto-start-reverse" is not implemented in SVG 1.1.

Embedded bitmaps edit

The first uploads of File:Solar_system_bodies_rotation_animation.svg and File:Cambridge_Kings_Ditch_map.svg gave blank thumbnails as width and height parameters of the image tag were omitted, though they rendered fine on Firefox and Chrome.

List of open Phab SVG bugs edit

Incomplete (please add missing ones e.g. from https://phabricator.wikimedia.org/tag/wikimedia-svg-rendering/)

Can be solved using svgworkaroundbot.toolforge.org edit

No automatic solution available edit

  • phab:T319377 The use element referencing another element via href attribute does not render (workaround: back to xlink:href attribute instead, and make sure the <svg> root tag have the xmlns:xlink="http://www.w3.org/1999/xlink" statement to make it works)

Solution not yet determined edit

  • phab:T261192 Rendering multilingual (systemLanguage) SVG files fails after upgrading librsvg from 2.40.21 to 2.44.10 possibly due to the LANG environment variable not controlling the language preference
  • phab:T265549 Update librsvg to > 2.44.10. Several librsvg issues are not fixed in 2.44.10 (Debian Buster), but are in later versions. Debian Bullseye (testing) is currently shipping 2.50.1.

References edit