:Note non-wmf users of MediaWiki can make use of wgSVGNativeRendering or older installation can use Extension:NativeSvgHandler
This epic is specifically about serving up SVGs that were uploaded to the File namespaces and included into wiki pages etc. These are currently served up as PNG thumbnails derived from the original SVG. However there is a desire to serve up the original SVG images instead.
Several challenges have been identified over the years that would be required to be solved for this to become a reality on WMF services.
- Fallback: Not all browsers support SVG, so we will need a fallback (This likely can be striken by now. By the time this gets deployed a fallback is likely no longer needed)
- Size: Some SVGs are way too large to serve them up raw. A limit (for instance 100Kb maximum on the original size ) has to be defined as to what is acceptable to serve up to user agents, SVGs above that either need to be simplified or served up as PNG.
- Feature: We support translations and these translations can be different than the user-agent language. This functionality should not be broken.
- Rendering: SVGs can contain text that is not converted to paths. This text depends on the fonts installed on the user-agent/browser. In order to preserve the intent of the uploader, it might be required to do on the fly conversion to paths or serving up SVGs with text as PNG to ensure that all users get consistent rendering
- Software adaptations for the above issues have to be implemented in the MediaWiki SVG handler
- Similar adaptations for the above issues might have to be implemented in the WMF Thumbor service which renders the thumbnails for Wikimedia
- The changes have to be behind a configuration flag, to assist with gradual rollout
- The changes have to be regression tested
- The changes have to be announced to the community
- The changes have to be rolled out and any feedback needs to be collected and follow up on.
See Also: T10901: [DO NOT USE] SVG rasterisation and management on Wikimedia sites (tracking)