extend_cache_images should add caching headers to SVG images #1221
Comments
Another option here would be to treat svgs as standard images, making them eligible for optimization as well as cache extension. @huibaolin are there things we could be doing to optimize svgs? I know they're vector graphics in xml, but there are probably some redundant things we could clean up? |
@jeffkaufman There is https://github.com/svg/svgo which works beautifully but is node based. To try it out quickly, you can also look at its frontend https://jakearchibald.github.io/svgomg/ |
Moved optimizing svgs to a new bug: #1231 |
Moved converting png to svg to a new bug: #1232 |
Would it make sense to look at cache extending for more mime types at this point? E.g. Webfonts? Tiff images? Mp3 audio? Is the work to be done on this dependent on the mime-type of the response? |
What @oschaaf is suggesting makes lots of sense. This issue is not svg specific. As of now only certain images, css, js, and pdfs get extended cache support. Content optimization and cache extension (along with url rewrite) can be fairly independent. May be we can have a filter which accepts the list of extensions to be cache extended. |
+1 - this would be useful! |
My client uses mps on all of their properties and relies on it heavily. SVG cache extension would really help them get to where they want to be on webpagetest: |
A large number of file formats can benefit from addition of caching headers (which also involves URL rewriting) even if the content is not optimized.
With
extend_cache_images
filter, SVGs are ignored as they are instead considered XML type. Given SVG is becoming a more mainstream thing, it should at least have better caching headers if not optimized content.The text was updated successfully, but these errors were encountered: