You are here

Let's make Drupal 8 support SVGZ (IIS tester required)

Submitted by jbrown on Fri, 10/11/2013 - 18:19

SVGZ is just SVG compressed with gzip. Any web browser that supports SVG supports SVGZ as the files are just served with a gzip encoding.

It is part of the SVG standard:

SVG images, being XML, contain many repeated fragments of text, so they are well suited for lossless data compression algorithms. When an SVG image has been compressed with the industry standard gzip algorithm, it is referred to as an "SVGZ" image and uses the corresponding .svgz filename extension. Conforming SVG 1.1 viewers will display compressed images.[8] An SVGZ file is typically 20 to 50 percent of the original size.[9] W3C provides SVGZ files to test for conformance.[10]

It would be really amazing if it could be assumed that every Drupal 8 site is capable of serving SVGZ.

For Drupal 8 to support SVGZ all that is required is for a couple of lines to be inserted into .htaccess for Apache to serve the files correctly. nginx can also be configured to serve SVGZ. At my request, Pantheon have already updated their nginx configuration to support it and I have confirmed that it works.

The issue for this is The patch makes the required changes to .htaccess, adds SVGZ versions of all the shipped SVG files and updates the CSS to serve the smaller SVGZ files.

The patch also adds SVGZ support to IIS. The only outstanding task is to check that this works. If you have access to IIS please, please test this patch!

Add new comment