linking to svg via sprite.svg

#35 · closed · 1 comments

View on GitHub ↗

giq-re

I am trying to link to an svg image in a jinja template via a global sprite file that references a folder of individual svgs. i can load a png via asset_url_for. i am using icomoon. <svg class="user-nav__icon"> <use xlink:href="{{ asset_url_for('img/sprite.svg#icon-bookmark') }}"></use> </svg> I understand that you don't need the xlink anymore. i have tried to link directly to svg in the folder itself and it did not work. svgs are referenced in my webpack.config Thanks, Andrew

Comments

nickjj

Hi, Sorry for the long delay. This project is about to get archived and will no longer be supported. A new project is taking its place at: https://github.com/nickjj/flask-static-digest This new project is much easier to use, and will not only work with Webpack but it will work with any (or no) asset build tools. It's completely standalone and much easier to use / configure.