• mziemichod

    (@mziemichod)


    If URLs to SVG are versioned, for example /wp-content/uploads/2022/10/badge.svg?ver=1.50.0, then they are skipped by the “svgs-inline-vanilla.js” script. I’ve checked it and it seems that piece of code below is responsible for that, it’d need to trim the versioning first or use clever regex to check the end of the src.

    var imgURL = img.src;
    
    // must be svg
    if( !imgURL.endsWith('svg') ){
        return;
    }
    • This topic was modified 2 years ago by mziemichod.
    • This topic was modified 2 years ago by mziemichod.
  • The topic ‘SVGs with `?ver=` parameter are skipped’ is closed to new replies.