collection Image URL

where to find the Url of the images uploaded in the wix image collection so as to directly using that URL in the code to display the images as required through code.

for example
in the below data set i want to add the images link( images already uploaded in wix library ) like in Image_add column. i want to display on button click without adding the images in the db and directly taking it from the wix library.


.Currently as to find the url (image_add) , i need to add the images manually in the page and the try to get the links(image_add) from console using code like this .

export function image1_click(event) {
let imageSrc = event.item.src;
console.log(imageSrc);
}

Any way to find the url of the images stored/uploaded in wix libarry directly or if there is any way to create the address our self ?

Hi Japinder,
Our code completion panel should be smart about where you need to supply images and offer “open media manager” in that context.

For example, if I have the following code:
$w(‘#image1’).src =

Hitting control-space on your keyboard will bring up the code completion panel (if it doesn’t open automatically) and allow you to go to the media manager to select the image you need.

1 Like

Thanks for the above reply .
but i need to store my uploaded pictures URL in my database . so that on my query code condition the selected picture should be displayed

for example a quiz where a question have a multiple choice answer in the image format . Now to store the images in can do it in two ways

  1. i can store in the wix image librarry
  2. upload it to my database under image type field .
    i don’t prefer db (2nd) option as it lead to lot of time to query and dig out the required image, which in turn will slow loading of the page .
    so i prefer to upload in the wix image folder and provide a image link in my db which can query and take out the link from my db and load automatically from wix image collection folder.

example of the db and query condition is as follow

so in the above i am trying to dynamic loading of the images , as in the highlighted section.
Code is not optimized neither correct, just written to show an example for what i am trying to do .

So in summary need to have a column in db which will be queried to take out the wix Image URL and on search criteria basis the images will be displayed on the gallery.

Hi Good day!
How to manage to get this kind of image URL? please see the image below

Hi Chleo,

This url is for images hosted in your site media manager .
It is also automatically generated when uploading a file using the Upload File element.

1 Like

Hi Ido,

Thank you for your kind reply, Roi already give the best solution how to do it

1 Like

Hi Chleo,
would you be so kind and share the solution as I am facing the same issue.

Thanks and kind regards,
Julia