Community Wishlist Survey 2021/Multimedia and Commons/Option to load SVG instead of PNG on pages by default

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
Random proposal ►

◄ Back to Multimedia and Commons


  • Problem: All SVG content is converted to PNG before sent to public.
  • Who would benefit: Servers, readers, and basically anyone.
  • Proposed solution: Load SVGs instead of PNGs on content pages (and file pages by default)
  • More comments: I'm proposing this so as to load SVG content natively (i.e. SVG directly delivered to content) instead of backend renders. Browsers have long been natively supporting SVG content, so it seems weird that vectors are still converted to raster graphics when web browsers genuinely support SVG already for a long time. It can be enabled as default on PC clients before introducing it to mobile though, considering even the lowest end PCs are able to load SVGs in browsers natively, but cannot confirm the state of it in mobile phones. Also, it helps in cases of Math functions where wikicode is transcluded to SVG before transcluding again to PNG content.
  • Phabricator tickets:
  • Proposer: 1233 T / C 18:37, 19 November 2020 (UTC)

Discussion[edit]

  • I think this would be an improvement overall, but this would also result in some issues for a small but non-zero number of SVG images that rely on librsvg quirks and would render differently if loaded directly. Jc86035 (talk) 09:57, 22 November 2020 (UTC)
    • @Jc86035: I think that this can be fixed, but not a very large problem. It should be a minor issue but not affecting a lot of things. The loader can also request a PNG version if it is using librsvg quirks (i.e. exemptions).--1233 T / C 10:20, 22 November 2020 (UTC)
      • Please see the discussion on serving/not-serving SVGs (mainly for missing reliable SVG sanitizer) at phabricator.wikimedia.org/T40010#6637830 --Volker E. (WMF) (talk) 18:31, 29 November 2020 (UTC)
        • Interesting question, but I'm curious if this is what this wishlist hope : if passed, the team would need to develop a reliable SVG sanitizer then.--1233 T / C 05:54, 30 November 2020 (UTC)