(Solved) How to get Image URL

How to get the image URL I upload to wix the same a the image below ?

'Cause I’m trying to copy the example hide and show.

Thank you!

urgently needs help!

1 Like

Hi Chleo,
Add the image to your page and use console.log


Then you can code the url
Good luck!

Hi Roi,

I’m new to this, could you please explain it more? and give some example?
Thank you!


  1. Add an image to the page from the editor.
    2.Set the id of the picture to be: myImage
  2. Example of code:
$w.onReady(() => {
  1. Click on the Preview and copy the path in the console.

Thank you for your patience to reply Roi


Hi Roi,

One more thing,
Could you please look at this code, I copied it from the Example Code from wix hide and show

const collarImage = {
	yellow: "image://v1/df645c_9bb535bf7a334d449ed0b2924221bf2e~mv2.png/_.png#originWidth=1500&originHeight=672",
	red: "image://v1/df645c_527d6af6c489438caca4e33f83b1fa4b~mv2.png/_.png#originWidth=1500&originHeight=672",
	white: "image://v1/df645c_fb90327818f7463eb7174f7b18209fc1~mv2.png/_.png#originWidth=1500&originHeight=672",
	green: "image://v1/df645c_655b403e464f44789c6ec32eaaab326c~mv2.png/_.png#originWidth=1500&originHeight=672",
	orange: "image://v1/df645c_4baa769f9bb0444d9940492b331ac586~mv2.png/_.png#originWidth=1500&originHeight=672",

const collarColors = ['yellow', 'red', 'white', 'green', 'orange'];

function showCollar(collarcolor) {
	$w('#collar').src = collarImage[collarColors];
	// hide the selection buttons for other colors
		.filter(_ => _ !== collarcolor)
		.forEach(_ => $w(`#${_}Selected`).hide());

export function checkbox9_click_1(event, $w) {
	//Add your code for this event here: 

export function checkbox7_click_1(event, $w) {
	//Add your code for this event here: 

export function checkbox10_click_1(event, $w) {
	//Add your code for this event here: 

export function checkbox8_click_1(event, $w) {
	//Add your code for this event here: 

export function checkbox6_click_1(event, $w) {
	//Add your code for this event here: 

What is the question ?

No, I’m asking if you could look at this and give some advice to do it right. Sorry if it confuse you.
I want to copy the functionality of that example code to my website.

Well, Is it working ?

no. I don’t know what is wrong, I copy and change everything that matches my site, and I use checkbox not image

Can you please share a link to your site and specify the name of the page ?

Here it is Roi, it just a single page - https://editor.wix.com/html/editor/web/renderer/edit/e59190d7-a71b-4b09-a759-68b4282a2eb3?metaSiteId=f157fc7c-10d6-4ee0-b15c-4ce6e8e056dd&editorSessionId=FFE0F41E-3B1C-4D42-8FBE-CAA8857D8682&referralInfo=my-account

Hi Roi, for addition, I got a error in console log when I click a checkbox which the element I use.

Hi Roi,

I already figure it out, and it’s now working perfectly. but I still get the error on the console log “.hide is not a function”
Thank you!

1 Like

I got the same error, is there any explanation, why the error shows up?

Just wonder if there is an easy way that when a .pdf is uploaded by user, the web page can be refreshed automatically to show description of the file and a hyper link for open the file ? Or I have to check the url of the uploaded .pdf whenever I upload the .pdf and then do the setup myself each time (e.g. add items to repeater manually with the url of new file or add record to database manually and configure the url of the PDF) ?

Hi Guys. I am facing a similar issue. How do we extract the URL from the Image Source? Note that I need to put this URL onto a vectorimage (V1) as a link. All URL point to an Image sitting on Wix media. Therefore can I reference in this manner "/media…, right?


Above is my first row in the Dataset. I need to take the largeImage string, and probably take a substring and make something like this, right?
and pass it to V1 right?

Please help me.

In addition how do I get the link to open in a pop-up instead of a new window?
I have looked everywhere and cannot seem to find how an element can be tied up to a dataset with images?

Please add your issue as a new post with a link to refer back to this old post, rather than bumping up an old thread from 2018.

Old post being closed.