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:
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>/