Can no longer change vector/SVG's source

Dear Wix Team,
A long time ago you added an API that allows us to change the source (src property) of an Vector/SVG element.
The problem now is, that it’s no longer working. When I try to change the src property to an URL of a SVG using code, it disappears. When I try to change it to an SVG XML string, nothing happens.
I don’t think there’s anything wrong with the code. So I’m assuming it’s a bug.
Here’s the code anyway:

$w("#vectorImage1").src = 'https://static.wixstatic.com/shapes/89e32c_7a27a8d4e6764ad9bca8b637805d8e55.svg';
 
$w("#vectorImage1").src = '<svg height="400" width="880"><rect width="100%" height="100%" fill="rgb(226,240,217)"><rect x="160" y="160" width="21" height="21" fill="rgb(179,146,5)"></svg>';

Make sure that you are using the right coding for your image in the media manager.
https://www.wix.com/corvid/forum/wix-tips-and-updates/new-api-vector-images
https://www.wix.com/corvid/reference/$w.VectorImage.html#src

The formats supported are:

  • Vector images from the Media Manager: wix:vector://v1/<vector_uri>/

  • Vector images from the web: http(s)://
    Alos, check the vector image from xml string as you could be missing a ‘/’

I have found this issue because all my sites suddenly don’t show the SVG Vectors that get changed via code. And also, the xml string works because I tested it in an html file.
Can you please test to see if it works for you?
Thanks.

@pptgames If the xml string isn’t the real issue, I’d recommend changing your first src to the wix:vector format as it pulls the resource from the site structure directly, whereas the https url fetches it like it would any URL by calling out to a separate server and thus it’ll be slower anyway.

You can get the wix:vector string by simply typing .src in the IDE and it’ll give you a little pop up to open the media manager. If nothing changes because it’s nothing to do with anything server-side, then I’d probably report it as a bug to Brett to make sure it’s escalated quickly.

Thanks for the update. This is in fact an issue on our hand - the team is on it.
As a workaround you can use the format from the media manager wix:vector://v1/<vector_uri>/

@pptgames Hi. There was an issue with SVGs, which was already fixed. Could you please check on your site? Thank you

Hi. Thanks for letting me know. I just checked if it works now, but still it doesn’t.

Hi again. I just tested it on a newer Site of mine, and it works. I guess it’ll take some time to affect my other Sites.

@pptgames Hi. Glad to hear it is working. In case you still have struggle with the old site, please share the link and we will check.
Thanks

@aleksander-denga Hi. I have just checked my older site, and it’s all working now. Thanks a lot.

Hi, could the same please done here on my beta site: https://paul9979.wixsite.com/website-27/mojiring/7340f921-0358-477c-9261-dabc0e24a6b0