Skip to content
代码片段 群组 项目
提交 9325c01f 编辑于 作者: Miguel Rincon's avatar Miguel Rincon
浏览文件

Render SVG images with "?path" in an <img> tag

Previously we always loaded all the svg files using the raw-loader
which fetches the entire svg body to add it inline inside an our HTML.
This a very flexible way to load them that has the advantage of allowing our client side code to manipulate the SVGs (such as adding styles).

However, this requires us to use v-safe-html to place the SVG inside
our markup, and makes SVG images work differently from other like PNG
and JPG.

This MR has our SVGs loaded as before by default, but allows us to
opt-in by adding a ?path query at the end of the import so it can be
loaded as any old image.
上级 6c6dec65
No related branches found
No related tags found
无相关合并请求
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册