I have this svg file:
<svg width="19" height="19" viewBox="0 0 19 19" fill="none" stroke="#000" xmlns="http://www.w3.org/2000/svg">
<path d="M17.4634 1.28027L1.17004 17.5619M7.41582 17.5619L17.4634 7.52156M17.4634 13.7628L13.6616 17.5619" stroke-width="2.33" stroke-linecap="round" />
</svg>
Without any edit to the svg, I want to add linear-gradient to it, then blur.
span {
display:block;
width:19px;
height:19px;
background: linear-gradient(0deg,red,blue);
mask-image: url("resize.svg");
filter: blur(3px);
}
<span> </span>
The file needs to be local so the snippet won't work, but you can try it locally after downloading the svg file.
The result I get from this code:

What I want instead:
at 3px blur
at 30px blur
- I can't change the svg file.
- It needs to be a
linear-gradientnot just a solid color. - It must work in
firefox. Don't mind if it doesn't work in other browsers. - It don't need to use mask just a way to add the
linear-gradientto the img and blur it. - The svg file is an external file not inline svg.


it can work if i put the
spaninside another element and apply theblurto the parent ( the new element )