[Resolved] Shrink SVG icons even a bit more

Home Forums Support [Resolved] Shrink SVG icons even a bit more

Home Forums Support Shrink SVG icons even a bit more

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1657001
    acela

    In looking at the code produced by GeneratePress, it appears there is some unnecessary markup used for SVG icons which can be removed to shrink the size and speed the loading of icons even further…

    In particular, these two declarations are not needed in the code produced:

    xmlns:xlink="http://www.w3.org/1999/xlink"

    version="1.1"

    It’s not a massive gain, but it’s free and every little bit helps! Add up 57 bytes saved here and there, and pretty soon we’re talking about real money… ๐Ÿ™‚

    References:

    https://medium.com/@peternowell/stuff-at-the-top-of-an-svg-f3ad198eb54e

    https://developer.mozilla.org/en-US/docs/Web/SVG/Namespaces_Crash_Course#Declaring_namespace_prefixes

    #1658187
    Tom
    Lead Developer
    Lead Developer

    Awesome, thanks for the heads up here! Will get this adjusted in GP 3.1.0 ๐Ÿ™‚

    #1658278
    acela

    Perfect, thanks Tom. Looking forward to the next release!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.