Community Wishlist Survey 2022/Multimedia and Commons/Improve SVG rendering
Appearance
Improve SVG rendering
- Problem: SVG images are currently rendered as scalar images before being displayed in Wikipedia articles, because at the time SVG support was added, many browsers could not reliably display SVGs. That rendering is currently being done by librsvg 2.40.x, which was deprecated in 2017, and which causes compatibility issues with lots of modern SVG images. Upgrading to a newer version has been blocked by the fact that the Thumbor thumbnailing system has no maintainer and is still running on Debian Stretch, despite the Wikimedia operating system upgrade policy saying that Stretch should've been phased out by June 2021, and Debian marking Stretch as End of life in June of 2022. An effort to replace librsvg altogether has stalled due to lack of WMF developer support for Thumbor.
- Proposed solution: Proposed solution is threefold:
- Find a maintainer for Thumbor and upgrade it to a modern operating system (likely Bullseye at this point, since Buster deprecation is supposed to begin later this year)
- Evaluate and implement a new SVG renderer
- Since all modern browsers have robust SVG support, allow SVGs to be displayed directly without conversion to scaler images under certain circumstances (the SVG is smaller in file size than the equivalent raster thumbnail, the SVG does not contain
<text></text>
tags since that can create issues with installed fonts and the systemLanguage attribute, etc.)
- Who would benefit: Anyone that creates SVG images, adds SVG images to articles, or reads articles that would benefit from better SVG rendering.
- More comments:
- Phabricator tickets: phab:T5593, phab:T40010, phab:T193352, phab:T216815, phab:T247697, phab:T294484.
- Proposer: Ahecht (TALK
PAGE) 21:31, 10 January 2022 (UTC)
Discussion
- I agree with this 100%, and whether or not this proposal is accepted now, it is going to have to be done at some near point down the line, and the sooner it is worked on the sooner we can get the headache out of the way. When it comes to librsvg, there have been several times when I have created or uploaded SVG images (for example, the logo for Post Luxembourg on enwiki) and either the old version of librsvg has rendered it completely incorrectly compared to how my browser does natively (also a point in favor of allowing direct displaying of SVG images, as pretty much all modern browsers have support for that) or renders it with graphical errors (see also SVG_help#Common_problems on enwiki), meaning that I (or another editor) then needs to find out where the error is, what is causing it, and develop a workaround, which ends up taking much more time and (often) results in a larger file size. I also wonder if there are certain scenarios where a higher-quality SVG image could currently be use, but the editor who wanted to make the change at the time is dissuaded from continuing due to an error which this far down the line (involving both a renderer nearly a decade out of date, a deprecated operating system, and a continuing lack of WMF support) should not need to be dealt with. HapHaxion (talk) 20:34, 11 January 2022 (UTC)
- Removed phab:T43426, phab:T64987 from the list of tickets, both get fixed with updating the software.--Snævar (talk) 18:47, 13 January 2022 (UTC)
- Showing SVGs natively on browsers allows to use animated SVG images (SMIL) for illustrations, icons, etc. which is definitely superior to GIF format in terms of quality, modifiability and size.Example 1, Example 2, Example 3 Jooja (talk) 10:32, 17 January 2022 (UTC)
- I agree that native svg rendering by browsers has a lot of advantages compared to librsvg but there may be some downsides. I work on maps in svg format which are much bigger in file size than the equivalent png format. As example this map is 14 MB in svg while it is 4.5 MB in 2000x4000px in png. --Ikonact (talk) 14:27, 30 January 2022 (UTC)
- I recommend further reading at
- c:User:JoKalliauer/SVG_test_suites, a current Bechmark for SVG-Renderer
- de:Wikipedia_Diskussion:Umfragen/Technische_Wünsche_2022_Themenschwerpunkte#Medieneinbindung_in_Artikeln_verbessern, the current Whislist for the German Wikipedia (don't forget to vote also there)
- mw:User:JoKalliauer/phab/wikimedia-svg-rendering#table, The table of all current SVG-Problems on phab:
- c:Librsvg_bugs, for the most prominent bugs
- A correction to the original proposal: Wikimedia servers are running librsvg 2.40.21 (not 2.40.2) which was released in 2020, but the entire 2.40.x branch was deprecated in 2017. -- Ahecht (TALK
PAGE) 18:26, 31 January 2022 (UTC)
- I take it it's too early (in terms of current web browser support) to use the picture element with the SVG file within a source element, and a fallback JPEG file within an img element, as described nicely on this page? --Bobulous (talk) 20:07, 5 February 2022 (UTC)
- As disscussed in phab:T283083 and based on SVG_test_suites and phabricator-tasks I recommend to switch to resvg
- @Snævar and Ahecht: I would add:
- phab:T283083 (Hackaton-Session about re-evaluating SVG-rendering), phab:T11420 (textPath), phab:T35245 (list of x-coordinates), phab:T20463 (pattern), phab:T154237 ("lang=zh-hant"), phab:T280718(keep fontlist updated), phab:T180923(fallback-fonts), phab:T261192 (systemLanguage won't work with rust-librsvg>=2.44, so don't(!) update librsvg)
- phab:T36947=phab:T205776=phab:T142908 needs rust-librsvg2.50.6 which is newer than the librsvg-version of bullseye (newest stable debian-version).
- maybe also client-side-rendering: phab:T208578, phab:T134408, phab:T134455, phab:T134407, phab:T134482
- maybe we should inform the subscribers on phab of the most relevant/generall bugs of this whishlist, that they can add a comment?
- — Johannes Kalliauer - Talk | Contributions 14:43, 8 February 2022 (UTC)
- @Snævar and Ahecht: I would add:
- Would have supported if I knew voting ended at 18 UTC. ~~~~
User:1234qwer1234qwer4 (talk) 18:43, 11 February 2022 (UTC)
Voting
- Support * Pppery * it has begun 18:47, 28 January 2022 (UTC)
- Support --Arnd (talk) 19:55, 28 January 2022 (UTC)
- Support USI2020 (talk) 20:36, 28 January 2022 (UTC)
- Support --YodinT 21:13, 28 January 2022 (UTC)
- Support Femke (talk) 21:29, 28 January 2022 (UTC)
- Support — Draceane talkcontrib. 21:52, 28 January 2022 (UTC)
- Support. Preferably, viewing SVG files as native SVG would be a beta feature that would be off by default, and would eventually be turned on for everyone. Tol (talk | contribs) @ 22:24, 28 January 2022 (UTC)
- Support Lion-hearted85 (talk) 22:42, 28 January 2022 (UTC)
- Support -- Guerillero Parlez Moi 23:29, 28 January 2022 (UTC)
- Support Izno (talk) 23:41, 28 January 2022 (UTC)
- Support DonBarredora (talk) 00:48, 29 January 2022 (UTC)
- Support Certes (talk) 01:28, 29 January 2022 (UTC)
- Support --𝑇𝑚𝑣 (𝑡𝑎𝑙𝑘) 01:58, 29 January 2022 (UTC)
- Support Betseg (talk) 02:19, 29 January 2022 (UTC)
- Support Shizhao (talk) 03:58, 29 January 2022 (UTC)
- Support Long overdue! --SSneg (talk) 20:52, 29 January 2022 (UTC)
- Support ··· 🌸 Rachmat04 · ☕ 08:16, 29 January 2022 (UTC)
- Support This, that and the other (talk) 08:37, 29 January 2022 (UTC)
- Support Šedý (talk) 10:47, 29 January 2022 (UTC)
- Support — ElioPrrl (talk) 11:12, 29 January 2022 (UTC)
- Support --F0x1 (talk) 13:49, 29 January 2022 (UTC)
- Support --Raymonde Lanthier (talk) 14:11, 29 January 2022 (UTC)
- Support Dexxor (talk) 14:41, 29 January 2022 (UTC)
- Support Aca (talk) 14:54, 29 January 2022 (UTC)
- Support Mbrickn (talk) 16:18, 29 January 2022 (UTC)
- Support HLFan (talk) 16:18, 29 January 2022 (UTC)
- Support --Cunegonde1 (talk) 18:24, 29 January 2022 (UTC)
- Support — Omnilaika02 (talk) 19:47, 29 January 2022 (UTC)
- Support --Denis Gagne52 (talk) 20:18, 29 January 2022 (UTC)
- Support Wostr (talk) 23:56, 29 January 2022 (UTC)
- Support TheInternetGnome (talk) 08:14, 30 January 2022 (UTC)
- Support DePlusJean (talk) 09:45, 30 January 2022 (UTC)
- Support OwenBlacker (Talk) 10:59, 30 January 2022 (UTC)
- Support Likibp (talk) 11:02, 30 January 2022 (UTC)
- Support Cantons-de-l'Est (talk) 12:04, 30 January 2022 (UTC)
- Support Alan Talk 13:34, 30 January 2022 (UTC)
- Support Ruthven (msg) 15:12, 30 January 2022 (UTC)
- Support HynekJanac (talk) 17:30, 30 January 2022 (UTC)
- Support Dominic Z. (talk) 18:23, 30 January 2022 (UTC)
- Support Jmaxx37 (talk) 18:42, 30 January 2022 (UTC)
- Support আফতাবুজ্জামান (talk) 20:10, 30 January 2022 (UTC)
- Support Coffeeandcrumbs (talk) 20:10, 30 January 2022 (UTC)
- Support Nw520 (talk) 22:30, 30 January 2022 (UTC)
- Support CdnMCG (talk) 05:19, 31 January 2022 (UTC)
- Support especially the fonts/texts are seldom hard to do right Nefronus (talk) 06:36, 31 January 2022 (UTC)
- Support Ariadacapo (talk) 10:19, 31 January 2022 (UTC)
- Support Ayack (talk) 10:37, 31 January 2022 (UTC)
- Support Trizek from FR 13:43, 31 January 2022 (UTC)
- Support Hb2007 (talk) 14:27, 31 January 2022 (UTC)
- Support c:User:JoKalliauer/SVG_test_suites — Johannes Kalliauer - Talk | Contributions 17:25, 31 January 2022 (UTC)
- Support Yes please. Thumbor's terrible situation is also blocking rolling out chemical markup (phab:T18491) Amir (talk) 18:01, 31 January 2022 (UTC)
- Support As proposer -- Ahecht (TALK
PAGE) 18:30, 31 January 2022 (UTC) - Support Auguel (talk) 19:40, 31 January 2022 (UTC)
- Support Glrx (talk) 20:00, 31 January 2022 (UTC)
- Support sarang♥사랑 20:59, 31 January 2022 (UTC)
- Support RCraig09 (talk) 21:13, 31 January 2022 (UTC)
- Support Yes Please! MapGrid (talk) 02:52, 1 February 2022 (UTC)
- Support Labdajiwa (talk) 03:30, 1 February 2022 (UTC)
- Support SCP-2000 08:13, 1 February 2022 (UTC)
- Support for a better/updated svg→png renderer. People who want to test browser rendering of svg images can use :en:User:Opencooper/svgReplace; this works well for small svgs, but there are 50+ MB geo maps around (example) that slow down display of the whole pages, both on page load and page scroll, so care should be taken not to load those. Ponor (talk) 08:39, 1 February 2022 (UTC)
- Support Thingofme (talk) 09:54, 1 February 2022 (UTC)
- Support Bencemac (talk) 11:41, 1 February 2022 (UTC)
- Support — Berrely • Talk∕Contribs 19:09, 1 February 2022 (UTC)
- Support Bietels (talk) 20:12, 1 February 2022 (UTC)
- Support Daniel Case (talk) 23:18, 1 February 2022 (UTC)
- Support Seboloidus (talk) 23:49, 1 February 2022 (UTC)
- Support The text kerning should be fixed at least. Nardog (talk) 00:45, 2 February 2022 (UTC)
- Support This is very much needed. Nosferattus (talk) 02:39, 2 February 2022 (UTC)
- Support How is this not yet a thing? Ɱ (talk) 04:09, 2 February 2022 (UTC)
- Support Hiàn (talk) 04:27, 2 February 2022 (UTC)
- Support Mike Rohsopht (talk) 09:05, 2 February 2022 (UTC)
- Support ~ Amory (u • t • c) 20:48, 2 February 2022 (UTC)
- Support God, yes, this is way overdue! I occasionally create maps, and uploading them in a form that doesn't result in mangled raster rendering has been a major source of headaches, to the extent that it's putting me off uploading maps at all. Uanfala (talk) 21:42, 2 February 2022 (UTC)
- Support Novak Watchmen (talk) 06:56, 3 February 2022 (UTC)
- Support Temp3600 (talk) 14:19, 3 February 2022 (UTC)
- Support Matěj Suchánek (talk) 12:53, 4 February 2022 (UTC)
- Support - Darwin Ahoy! 19:50, 4 February 2022 (UTC)
- Support Yeeno (talk) 20:27, 4 February 2022 (UTC)
- Support Simeon (talk) 21:35, 4 February 2022 (UTC)
- Support Pi.1415926535 (talk) 21:56, 4 February 2022 (UTC)
- Support SD hehua (talk) 15:21, 5 February 2022 (UTC)
- Support Lutzto (talk) 17:40, 5 February 2022 (UTC)
- Support Bobulous (talk) 20:08, 5 February 2022 (UTC)
- Support —Thanks for the fish! talk•contrib (he/him) 21:49, 5 February 2022 (UTC)
- Support kocio ✉ 01:01, 6 February 2022 (UTC)
- Support – in particular, "allow SVGs to be displayed directly without conversion" — cmɢʟee::τaʟκ 03:07, 6 February 2022 (UTC)
- Support--Vulp❯❯❯here! 07:38, 6 February 2022 (UTC)
- Support Ayumu Ozaki (talk) 08:42, 6 February 2022 (UTC)
- Support —— Eric Liu(Talk) 09:33, 6 February 2022 (UTC)
- Support 4nn1l2 (talk) 15:34, 6 February 2022 (UTC)
- Oppose --Ciao • Bestoernesto • ✉ 16:54, 6 February 2022 (UTC)
- Support Quedel (talk) 19:18, 6 February 2022 (UTC)
- Support Vollbracht (talk) 19:55, 6 February 2022 (UTC)
- Support //Lollipoplollipoplollipop::talk 11:22, 7 February 2022 (UTC)
- Support paul2520 (talk) 16:50, 7 February 2022 (UTC)
- Support I think it is time, and I think it can be done. —TheDJ (talk • contribs) 17:48, 7 February 2022 (UTC)
- Support ~Cybularny Speak? 21:16, 7 February 2022 (UTC)
- Support --Bikepunk2 (talk) 22:42, 7 February 2022 (UTC)
- Support MichaelSchoenitzer (talk) 14:54, 8 February 2022 (UTC)
- Support — DaxServer (t · c) 20:20, 8 February 2022 (UTC)
- Support — it seems about time... — RobLa (talk) 22:39, 8 February 2022 (UTC)
- Support · · · Peter (Southwood) (talk): 13:16, 9 February 2022 (UTC)
- Support Can we finally get rid of annoying rendering bugs? Milky·Defer 03:15, 10 February 2022 (UTC)
- Support ZellmerLP (talk) 19:29, 10 February 2022 (UTC)
- Support Yisibl (talk) 04:15, 11 February 2022 (UTC)
- Support Gaurav (talk) 07:10, 11 February 2022 (UTC)
- Support evrifaessa (talk) 16:55, 11 February 2022 (UTC)
- Support Hell yes to native SVG rendering (* in cases where bandwidth is smaller than PNG/WEBP/AVIF rendering). stjn[ru] 17:05, 11 February 2022 (UTC)
- Support -BRAINULATOR9 (TALK) 17:16, 11 February 2022 (UTC)