Get the "wix:image://v1/" Media Manager URL

It took me an embarrassingly long time to work out how to get the Media Manager URL for images so I could have code a random rotation of background images. I searched far and wide was unable to find information anywhere about what the first file name in the examples was. It took me way too long to notice the similarity to the static URLs of my images.

So it’s “wix:image://v1/” + the static file name + “/” + the file name in Media Manager + “#originWidth=” + desired width + “&originHeight=” + desired height.

So let’s say the static URL (what you get when you hit “Copy URL” under file info on your image in Media Manager) is “https://static.wixstatic.com/media/323e69_d53d1128145bj9c1973ac300db475d83~mv2.jpg”, and the filename in Media Manager is “sampleimage.jpg” and the desired width and height are 720px.

Then your Media Manager URL will be “wix:image://v1/323e69_d53d1128145bj9c1973ac300db475d83~mv2.jpg/sampleimage.jpg#originWidth=720&originHeight=720”.

Hope this saves someone some time.

2 Likes