Jump to content

Manual:$wgSVGNativeRenderingSizeLimit

From mediawiki.org
SVG: $wgSVGNativeRenderingSizeLimit
Limit on an SVG file's size for it to be rendered by the client, in bytes.
Introduced in version:1.41.0 (Gerrit change 921379; git #85dd5826)
Removed in version:Still in use
Allowed values:Unspecified
Default value:50 * 1024; // 50 KB

Details

Limit on an SVG file's size for it to be rendered by the client, in bytes. If the filesize is equal to or over the limit, the file is rasterized server-side and served as a bitmap, even if $wgSVGNativeRendering = true;.

If the filesize is less than the limit, it is served directly to the client and rendered natively by the browser as SVG unless $wgSVGNativeRendering = false; which disables native rendering completely.

Changing this value will change the display behavior of existing File namespace pages, or file thumbnail usage on-wiki between rendering SVG in the browser vs displaying generating PNG bitmaps. For example, allowing greater limits for serving SVG directly to the browser will mean sharper-looking previews and that you can clean up unused thumbnails in the filestore.

See also

  • $wgSVGNativeRendering
  • $wgSVGNativeRenderingSizeLimit should not be confused with $wgMaxUploadSize which is the size limit for all upload operations, but obviously a larger Rendering Size Limit will not mean much if it is larger than the allowed upload size limit.